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

QPainter does not honor Qt::SmoothPixmapTransform render hint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.3.1
    • GUI: Painting
    • None
    • Linux 3.7.10-110.gbe6d65b-desktop #1 SMP PREEMPT Thu Jun 5 06:35:30 UTC 2014 (be6d65b) x86_64 x86_64 x86_64 GNU/Linux

    Description

      When using a QPainter to draw a scaled image, the result is really poor even with the Qt::SmoothPixmapTransform render hint turned on. It looks like it does not make any difference is the hint is enabled or not.

      Scaling with QImage::scaled(..., Qt::SmoothTransformation) first and then painting the scaled image results in a superior rendering.

      I attached an example project that displays an image at it's original size (128x128) and then scaled down to 20x20 pixels via the painter and via QImage::scaled().

      Attachments

        1. ScaledImage.zip
          7 kB
          Marc Langenbach
        2. scaledimagecomparison.png
          23 kB
          Marc Langenbach
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            mlangen Marc Langenbach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes