[Qt-interest] QImage ::bits()
Christian Dähn
daehn at asinteg.de
Thu Dec 31 13:58:00 CET 2009
Hi,
> Hi, I used QImage to load a bmp file, and tried to show it using OpenGL glDrawpixel, but found the image reconstructed out of order.
> So, what's the format of data give by QImage::bits() ?
By default it's stored as (A)RGB pixel array, which is 4 Byte aligned.
So each line can contain empty padded pixel at the end of the line to
get the 32 Bit / 4 Byte line size.
To get the current real length of a line use QImage::bytesPerLine().
ciao,
Chris
More information about the Qt-interest-old
mailing list