RESOLVED FIXED 30825
[CHROMIUM] Chromium/skia's canvas getImageData() is not accurate
https://bugs.webkit.org/show_bug.cgi?id=30825
Summary [CHROMIUM] Chromium/skia's canvas getImageData() is not accurate
Stephen White
Reported 2009-10-27 09:17:30 PDT
Chromium/skia's implementation of canvas getImageData() does not unpremultiply colour values correctly. In particular, LayoutTests/fast/canvas/canvas-getImageData.html requires that premultiplied values retrieved from the canvas are accurately divided by alpha, but not rounded. See http://crbug.com/22700
Attachments
Fix for data getImageData()'s unpremultiply (2.22 KB, patch)
2009-10-27 09:22 PDT, Stephen White
no flags
Fix typo (2.21 KB, patch)
2009-10-27 15:06 PDT, Stephen White
dimich: review+
commit-queue: commit-queue-
Stephen White
Comment 1 2009-10-27 09:22:23 PDT
Created attachment 41958 [details] Fix for data getImageData()'s unpremultiply
David Levin
Comment 2 2009-10-27 14:14:45 PDT
Comment on attachment 41958 [details] Fix for data getImageData()'s unpremultiply > Index: WebCore/platform/graphics/skia/ImageBufferSkia.cpp > + destPixel[1] = a ? SkColorGetG(color) * 255 / a : 0, I think you wanted a ";" here instead of a ",".
Stephen White
Comment 3 2009-10-27 15:06:52 PDT
Created attachment 41990 [details] Fix typo
WebKit Commit Bot
Comment 4 2009-11-09 17:25:27 PST
Comment on attachment 41990 [details] Fix typo Rejecting patch 41990 from commit-queue. Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Dmitri Titov', '--force']" exit_code: 1 patching file WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file WebCore/platform/graphics/skia/ImageBufferSkia.cpp Hunk #1 FAILED at 164. 1 out of 1 hunk FAILED -- saving rejects to file WebCore/platform/graphics/skia/ImageBufferSkia.cpp.rej
Eric Seidel (no email)
Comment 5 2009-11-09 17:30:35 PST
Looks like this was landed as r50408 but just not closed.
Note You need to log in before you can comment on or make changes to this bug.