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

Setting Image.sourceSize causes artefacts and blurriness

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.6.1
    • None
    • Kubuntu 16.10

    Description

      Setting sourceSize in Image can cause a grid-like pattern (compression artefact?) and blurriness. Attached is the output (magnified 4x) of the following minimal example with and without sourceSize. The image file (3840x2400 pixels) can be found at https://interfacelift.com/wallpaper/details/3162/christmas_eve_in_seattle.html

      This bug causes bad rendering of wallpapers in KDE Plasma: https://bugs.kde.org/show_bug.cgi?id=338506

      import QtQuick 2.5
      
      Image {
      	width: 1920    // EDIT: actually the aspect ratio needs to change for the bug to be triggered, so change this to 1800 for example
      	height: 1200
      	source: "03162_christmaseveinseattle_3840x2400.jpg"
      	sourceSize: Qt.size(width, height)
      }
      

      EDIT: In fact this comes up only if sourceSize has a different aspect ratio than the original image. The aspect ratio should not matter though because the documentation says the source aspect ratio will not be altered.

      Attachments

        1. no_sourcesize.png
          172 kB
          Tuukka Verho
        2. sourcesize.png
          147 kB
          Tuukka Verho

        Issue Links

          For Gerrit Dashboard: QTBUG-57619
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              tverho Tuukka Verho
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes