View Full Version : Qimage in RGB24

27th June 2006, 22:55
Hi all,
I'd like to load a bitmap file into a QImage but I'd like to have it in RGB24 format(in order to acces with bits() a buffer 0xRRGGBB), reading the documentation this format is not allowed, is there a way to do so?
thanks in advance

28th June 2006, 08:17
You'll probably have to use 32 bits, I'm not sure which byte is the alpha-channel but a quick test with an image of known values (ie. all red) should let you know. You can also use
QRgb QImage::pixel ( int x, int y ) constto get the values of a specific pixel