Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.5.1, 5.7.0
-
None
Description
Maybe I'm missing something, but I think QPixelformat::typeInterpreation() returns the wrong value, QPixelFormat::UnsignedInteger, for Format_RGB888. Shouldn't it return QPixelFormat::UnsignedByte? Or how makes QPixelFormat::UnsignedInteger (4 Byte in size) sense for a format which uses only 3 Byte to store its pixels?
And for example the Bytes of Format_RGB888 are stored this way on a Intel / little endian system in the memory:
R G B R G B R G B .....
And for Format_RGB32 in this way:
B G R A B G R A B G R A .....
But QPixelformat for both formats (returned from QImage) deliver:
QPixelformat::colorModel(): QPixelFormat::RGB
QPixelformat::typeInterpretion(): QPixelFormat::UnsignedInteger
QPixelformat::byteOrder(): QPixelFormat::LittleEndian
So I can't see how to get the different ordering of R, G and B for Format_RGB888 and Format_RGB32 by QPixelformat to access the R, G, and B value in memory correctly.
Attachments
For Gerrit Dashboard: QTBUG-56250 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
173408,2 | Fix QPixelFormat::typeInterpretation() for Format_RGB888 | 5.6 | qt/qtbase | Status: MERGED | +2 | 0 |