[Webkit-unassigned] [Bug 49365] [chromium] Add canvas.toDataURL("image/jpeg", quality) support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 25 07:25:17 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=49365
--- Comment #8 from Stephen White <senorblanco at chromium.org> 2010-11-25 07:25:17 PST ---
(From update of attachment 74360)
Thanks for taking this on!
View in context: https://bugs.webkit.org/attachment.cgi?id=74360&action=review
> WebCore/ChangeLog:16
> + alpha channel when extracting an "image/jpeg".toDataURL(). The correct answer
> + needs more investigation.
I don't know if it helps for this particular test, but some of the canvas/philip tests require a different unpremultiply that the one implemented in SkUnPreMultiply, in order to achieve roundtrip lossless conversion on a certain set of colours. See http://trac.webkit.org/changeset/71760, function mulDiv255Ceil() in ImageBufferSkia.cpp. The test was canvas/philip/tests/2d.imageData.put.unchanged.html. If this does fix the problem, it would be ideal if you could upstream this function to Skia.
> WebCore/platform/image-encoders/skia/JPGImageEncoder.cpp:107
> + SkColor unmultiplied = SkUnPreMultiply::PMColorToColor(*pixel++);
See above: check if mulDiv255Ceil() fixes the JPEG+alpha case.
> WebCore/platform/image-encoders/skia/JPGImageEncoder.cpp:117
> + out->m_buffer.resize(8192);
This magic value should be in a constant.
--
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