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

Bad depth in QImage after in-place depth-reducing conversion

    XMLWordPrintable

Details

    • Linux/X11
    • 8f88a3962a7b1716d2c0482b818d2504776ece05 (qt/qtbase/5.15)

    Description

      The following highlights the problem:

          auto img = QImage(1, 272, QImage::Format_Indexed8);
          auto foo = img.convertToFormat(QImage::Format_RGB16);
          qWarning() << foo.format() << foo.depth(); // Format_RGB16, depth==32!
      

      I think the conversion to RGB16 effectively converts to RGB32 and then in-place to RGB16.

      I guess that the issue was introduced in b10e1209e1c3655ee6e57185bb5375408ce02e56. It is not present in 5.14.0.

      Attachments

        For Gerrit Dashboard: QTBUG-83179
        # Subject Branch Project Status CR V

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            ckamm Christian Kamm
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes