Page 1 of 1

wxImage from 8bpp bitmap data

Posted: Sat Jul 21, 2007 3:08 pm
by spectrum
hello all,

i have this issue:
i have a 8bpp bmp in memory, and i have to create a portable image (wxImage), and then give it to wxBitmap to display it.

Btw, i've seen i can only give a 24bpp to

Code: Select all

wxImage(int width, int height, unsigned char* data, bool static_data = false)
So i'm stucked here. I can't generate a 24bpp in memory, only 8bpp.

If any suggestion,
thanks
angelo

Posted: Mon Jul 23, 2007 8:09 pm
by lvdlinden
You could create a wxImage and then for each pixel call wxImage::SetRGB.