Array to Bitmap problem 
Author Message
 Array to Bitmap problem

I am a fairly new VB programmer and have a problem, which I have not
been
able to get answers for on other VB newsgroups. I am reading raw image
data from a file into an array and then drawing into a picturebox -
pixel
by pixel (using API Setpixelv). The main problem is that this somewhat
slow. I would like to know if I can convert the array to a bitmap and
load
into the picturebox using the  BitBlt function. I would be grateful if
anyone could give me any help on this.

David Vowles



Sat, 29 Jan 2005 05:18:29 GMT  
 Array to Bitmap problem
Easier than going through all the steps for BitBlt is using
SetDIBits().  All you have to do is build the BITMAPINFOHEADER and
make sure that you set it into a picturebox of exactly the correct
size (watch out for the borders -- they're not part of the drawing
surface!)

Jim Deutch
MS Dev MVP


Quote:
>I am a fairly new VB programmer and have a problem, which I have not
>been
>able to get answers for on other VB newsgroups. I am reading raw image
>data from a file into an array and then drawing into a picturebox -
>pixel
>by pixel (using API Setpixelv). The main problem is that this somewhat
>slow. I would like to know if I can convert the array to a bitmap and
>load
>into the picturebox using the  BitBlt function. I would be grateful if
>anyone could give me any help on this.

>David Vowles



Tue, 01 Feb 2005 00:10:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Array to Bitmap Problem

2. Manipulate bitmap data with byte array in/out

3. byte array into bitmap image in vb ?

4. How to load Bitmap Array into Picture Control

5. byte array into bitmap image in vb ?

6. loading bitmap info into a 2dim array

7. Bitmap from Array: More Info

8. Help: Marshall/De-Marshall a Bitmap to/from String or Integer Array

9. Showing an array as bitmap

10. write a bitmap into an array of picture boxes

11. Load Bitmap into Byte Array from memory

12. Copy Bitmap into Byte-Array

 

 
Powered by phpBB® Forum Software