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

QImage scaled shouldn't change the image format

    XMLWordPrintable

Details

    Description

      Steps to reproduce the problem:
      1., Please build and run the attached application.
      2., Check the logs
      Actual result: the result image of scaled is not 8bit as the initial image
      Expected result: the image should have the same format as the initial image

      The problem escalates further as when it is converted back to the same format it looks bad no matter which conversion flags are used. It can be compared when Qt::FastTransformation is used (this one doesn't change the format), then the result looks much better then with SmoothTransformation and convertToFormat.

      QImage should also have more filters like for example Lanczos.

      Attachments

        1. earth-huge.png
          earth-huge.png
          3.71 MB
        2. imageconversion8bit.pro
          0.1 kB
        3. main.cpp
          1 kB
        4. Patch.diff
          6 kB

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            qtcomsupport Qt Support
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: