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

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

XMLWordPrintable

    • 0043fab778f2497f644c434a194b5c5eec851819

      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...

        1. continuous.qml
          3 kB
          Shawn Rutledge
        2. main.qml
          3 kB
          Alexandre GRANVAUD
        3. QTBUG-59170.tgz
          1 kB
          Shawn Rutledge
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes