wxImage from 8bpp bitmap data Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

wxImage from 8bpp bitmap data

Post by spectrum » Sat Jul 21, 2007 3:08 pm

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
spectrum

lvdlinden
Earned some good credits
Earned some good credits
Posts: 147
Joined: Thu May 17, 2007 7:03 am
Location: 's-Hertogenbosch, Netherlands

Post by lvdlinden » Mon Jul 23, 2007 8:09 pm

You could create a wxImage and then for each pixel call wxImage::SetRGB.

Post Reply