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:
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.