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

Canvas ImageData can't save values as 0

    XMLWordPrintable

Details

    • fc454c16c84d159767273a21019fbd65572f3bad

    Description

      On changing canvas imagedata object it cannot set values as 0.
      Setting range 1-255 works normally.

      Steps to reproduce:
      1. Create Canvas element and get 2d context
      2. Create imageData e.g. 1x1 size
      3. Set first element of data (red channel) and fourth element (alpha) as 255
      4. Set first element as 0
      5. Console this element

      As you can see, our value is still 255.

      The same canvas code works in browser (tested on Chromium 22.0 - see screenshot).

      For easiest debug I attach results and code for 100x100 canvas size.

      Attachments

        1. imageData-bug-chrome.png
          9 kB
          Krystian Kruk
        2. imageData-bug-qml.png
          3 kB
          Krystian Kruk
        3. main.qml
          0.7 kB
          Krystian Kruk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rodal Samuel Rødal
            kildyt Krystian Kruk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes