[webkit-reviews] review requested: [Bug 21575] Cairo's ImageBuffer::getImageData() does not handle alpha=0 case correctly : [Attachment 27216] imageData respects pre-multiplied colors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 31 07:19:33 PST 2009

Dirk Schulze <krit at webkit.org> has asked  for review:
Bug 21575: Cairo's ImageBuffer::getImageData() does not handle alpha=0 case

Attachment 27216: imageData respects pre-multiplied colors

------- Additional Comments from Dirk Schulze <krit at webkit.org>
This fixes the pre-multiplied colors bug, as well as the alpha=0 case. It reads
the colors, given to the context, correctly but fails on the
canvas-getImageData test.
But the fact, that the context gets the wrong color and getImageData reads
exactly this color-settings, tells that getImageData works correctly. (see
You can see the results of the test on the second attachment and the alpha of
the colors, given to the context and therefor to the ImageBuffer, on the third
attachement. You'll see, that the alpha channel is identical. (Haven't added
all colors, but the result is the same)

This patch passes canvas-putImageData.

I talked about platform dependencies on IRC (#cairo). And they assure me, that
this code is already endian safe.

More information about the webkit-reviews mailing list