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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes