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

Using Image.Pad with AA_EnableHighDpiScaling results in scaling; blurry images

    XMLWordPrintable

Details

    • fe10cee6265f068bf0da03895c0c7c5680dc36a5

    Description

      See the attached example.

      To summarise, doing the following with High DPI scaling enabled results in blurry images (bad.png):

      main.qml
      import QtQuick 2.4
      import QtQuick.Window 2.2
      
      Window {
          id: window
          visible: true
      
          Image {
              source: "qrc:/menu.png"
              fillMode: Image.Pad
      
              Rectangle {
                  anchors.fill: parent
                  color: "transparent"
                  border.color: "darkorange"
              }
          }
      }
      

      Taking away the fillMode: Image.Pad statement results in good.png.

      The screenshots were taken with a 4x scale factor, but I've also tested it with x2.

      Attachments

        1. bad.png
          bad.png
          8 kB
        2. good.png
          good.png
          7 kB
        3. untitled.zip
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes