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

QImage scaled with Qt::FastTransformation is broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.2
    • 5.0.0
    • None
    • OSX 10.6.8
    • a9458a175598a0da0fdfbfed7f9470878af25b72

    Description

      QImage::scaled funtion with Qt::FastTransformation doesn't scale the image rather It just cuts image to size.
      When using Qt::SmoothTransformation the returned image is scaled as expected.

      It works good on Windows:

      QImage img("/Users/irfanomair/Desktop/mm.jpg","jpg");
      QImage img2 = img.scaled(QSize(200,100), Qt::KeepAspectRatio, Qt::SmoothTransformation);
      img2.save("/Users/irfanomair/Desktop/mmSmooth.jpg","jpg");
      QImage img3 = img.scaled(QSize(200,100), Qt::KeepAspectRatio, Qt::FastTransformation);
      img3.save("/Users/irfanomair/Desktop//mmFast.jpg","jpg");

      Attachments

        1. mm.jpg
          mm.jpg
          435 kB
        2. mmFast.jpg
          mmFast.jpg
          3 kB
        3. mmSmooth.jpg
          mmSmooth.jpg
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes