[Webkit-unassigned] [Bug 29449] New: [Qt] ImageBuffer::putImageData() inverts red and blue channels

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 07:57:50 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29449

           Summary: [Qt] ImageBuffer::putImageData() inverts red and blue
                    channels
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vestbo at webkit.org


This bug report originated from issue QTBUG-4184
<http://bugreports.qt.nokia.com/browse/QTBUG-4184>

--- Description ---

ImageBuffer::putImageData() inverts red and blue channels.

Consider the following JavaScript and HTML snippets:

...
var elem = document.getElementById('myCanvas');
var context = elem.getContext('2d');
var img = context.createImageData(50, 50);
var pix = img.data;

for (var i = 0, n = pix.length; i < n; i += 4) {
    pix[i] = 255; // the red channel
    pix[i + 3] = 127; // the alpha channel
}

context.putImageData(imgd, 0, 0);
...
<canvas id="myCanvas" width="50" height="50" />
...


The expected result is that a red square is painted with an alpha value of 127
(thus appearing to be pink against a white background).

The actual result is that the red and blue channels are inverted, so the square
is painted with a blue tint.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list