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

QTransform results in distorted image for some images

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.7.2, 5.3.0, 5.4.0, 5.9.0 Beta 1
    • Fix Version/s: 5.9.0 Beta 3
    • Labels:
      None

      Description

      consider the following code:

      QImage image(...);
      QPixmap pix = QPixmap::fromImage( image.transformed(QTransform().rotate(45) ,Qt::SmoothTransformation) );
      pix.save(...);
      

      This code results in a 45° rotated image for all images (attached), except for "test_800x600_8bit.png". Which results in a completely distorted image:

      So it seems it fails for some images. But i only encountered it for some 8bit PNG files, which are bigger than a certain size, since it works for small 8bit PNG images.

        Attachments

        1. PixmapRotation.tar.gz
          1 kB
        2. test_32bit.png
          test_32bit.png
          1 kB
        3. test_800x600_32bit.png
          test_800x600_32bit.png
          12 kB
        4. test_800x600_8bit_rotated.png
          test_800x600_8bit_rotated.png
          5 kB
        5. test_800x600_8bit.png
          test_800x600_8bit.png
          10 kB
        6. test_8bit.png
          test_8bit.png
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            allan.jensen Allan Sandfeld Jensen
            Reporter:
            raven-worx raven-worx
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes