Array to BMP 
Author Message
 Array to BMP

> I'm trying to develop or find an image control that will
> allow me to send a 2 dimensional array of rgb values to
> it, with each element in the array representing an
> individual pixel.  I have never done any real imaging
> development before so any and all help would be hugely
> appreciated.

You've not specified what format your data is in, however if it's in a
format compatible with the Windows GDI (DWord aligned, bottom to top
scan-line ordered, True colour BGR[A], High colour 5:5:5 packed or Indexed
8/4/1 bit packed) then you can use the SetDIBits() or SetDIBitsToDevice()
API calls to blast the data directly into a Bitmap or DC object, or you
could also create a new Bitmap using your existing data as a base.  If your
data isn't in a format compatible with the GDI then you must first swap the
ordering of the bytes (Or up-pack, re-pack the data if you're working with a
packed format - You can accomplish this real fast with a 'bit swizzler')
Hope this helps,


 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: http://www.*-*-*.com/

Sat, 07 May 2005 16:51:26 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Color-Array to .bmp?

2. convert byte array to bmp

3. byte array to bmp

4. HELP !!! BMP to Byte Array conversion

5. array -> bmp

6. Display BMP array?

7. HELP !!! BMP to Byte Array conversion

8. Converting a BMP file to an array

9. How do I convert BMP files to arrays?

10. Reading .bmp files into an array

11. Convert color BMP to black and white BMP

12. 24 bit BMP to 8 bit BMP


Powered by phpBB® Forum Software