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

[REG 5.7->5.8] Canvas getImageData doesn't handle High DPI

    XMLWordPrintable

Details

    • 0043fab778f2497f644c434a194b5c5eec851819

    Description

      In a Canvas item, calling getImageData on the context2D javascript objet, doesn't return data independent of the screen's DPI.
      It works if the app doesn't call QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

      It also works in Qt 5.7 and below.
      In 5.8 you have to call ctx.getImageData((mouse.x*Screen.pixelDensity/2 ...etc.
      Reproducible easily on Android and iOS, not on my Windows because it's not high DPI but maybe on a high DPI windows...

      Attachments

        1. continuous.qml
          3 kB
          Shawn Rutledge
        2. QTBUG-59170.tgz
          1 kB
          Shawn Rutledge
        3. main.qml
          3 kB
          Alexandre GRANVAUD

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              AlGrenadine Alexandre GRANVAUD
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes