Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56250

QPixelFormat::typeInterpretation() wrong for Format_RGB888

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.2, 5.7.1
    • 5.5.1, 5.7.0
    • Image formats
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            blgis Bernd Lachner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes