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

QImage / QImageReader: lost QColorSpace during rotation

    XMLWordPrintable

Details

    • Windows
    • bea8beef8 (dev), aba84d1e6 (6.8), 4a5b7ef64 (6.7), 1a7fbb055 (tqtc/lts-6.5)

    Description

      When I rotate an image (e.g. 90 degrees), the color profile information is lost. Here's an example:

          for (int i = 0; i < 2; ++i) {
              QImage qi(16, 16, QImage::Format_ARGB32);
              qi.setColorSpace(QColorSpace(QColorSpace::AdobeRgb));
              if (i)
                  qi = qi.transformed(QTransform().rotate(90));
              qDebug() << qi.colorSpace().isValid() << qi.colorSpace().description();
          }
      

      The result is:

      true "Adobe RGB"
      false ""
      

      Same problem when loading an image (e.g. the attached TIFF) with orientation (from 4 to 7) using QImageReader and setAutoTrasform(true):

          for (int i = 0; i < 2; ++i) {
              QImageReader r("dice_r.tif");
              r.setAutoTransform(i ? true : false);
              auto qi = r.read();
              qDebug() << qi.colorSpace().isValid() << qi.colorSpace().description();
          }
      

      The result is:

      true "sRGB Linear build-in"
      false ""
      

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            mircomir Mirco Miranda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes