Micosoft.Spot.Bitmap Structure

Hello,

I’m currently working on some image manipulations based on the byte[ ] returned from
Microsoft.SPOT.Bitmap.GetBitmap()

The problem is i couldnt find informations about what structure that returned byte[] is.

I expected it to be like in the first 3 elements of the array we find the RGB values of the first pixel and in the second 3 the RGB values of the second pixel. That seems to be wrong.

I saw that the number of elements in the array is four times bigger than the number of pixel so is there another value along the RGB value for each pixel?

Thanks in Advance :slight_smile:

@ Hanswurst - It is probably a 32bpp image where there is a byte each for RGB and A (alpha channel) which controls opacity

1 Like

I think the Microsoft implementation provides a .BMP file with all the associated header info etc.

As of 4.3.6.0 The GHI.Utilities.Bitmaps.GetBuffer() method is the fastest way to get a raw byte array. in 565 format. You can also pass a bitmap directly to RLP which is really handy.

https://www.ghielectronics.com/downloads/man/Library_Documentation_v4.3/html/e157ffba-c1fd-f0aa-69e8-3ec5814fdf3e.htm

Thanks to munderhill…this was what i was looking for :slight_smile: