RESOLVED FIXED 86722
Add a test for PNG COLOR_TYPE_PALETTE image with a color profile
https://bugs.webkit.org/show_bug.cgi?id=86722
Summary Add a test for PNG COLOR_TYPE_PALETTE image with a color profile
noel gordon
Reported 2012-05-17 05:43:39 PDT
Some test images at the above URL are PNG_COLOR_TYPE_PALETTE color and have an ICC color profile. The public image decoders that support ICC color profiles (currently, Chromium MAC) decode the images fine but fail to properly color correct the decoded image. Add a test for this case, then fix it later by adding PNG_COLOR_TYPE_PALETTE color correction support to the public PNG decoder.
Attachments
Screen shot: Safari-5.1.5-left and Chrome-20.0.1132.3-dev-right (74.01 KB, image/png)
2012-05-17 22:33 PDT, noel gordon
no flags
png-colortest-html-images-webkit-test-use.txt (493 bytes, text/plain)
2012-05-18 01:54 PDT, noel gordon
no flags
Patch (51.08 KB, patch)
2012-05-23 00:14 PDT, noel gordon
no flags
paletted-color-gamma-one-color-profile-image-info (42.47 KB, image/png)
2012-06-05 23:10 PDT, noel gordon
no flags
test image in chrome 21, safari 5.1.7, firefox 12 (47.42 KB, image/png)
2012-06-05 23:13 PDT, noel gordon
no flags
Patch (8.54 KB, patch)
2012-06-05 23:15 PDT, noel gordon
no flags
noel gordon
Comment 2 2012-05-17 22:32:54 PDT
Reference image (what they should look it): http://www.libpng.org/pub/png/img_png/ArcTriomphe-iCCP-orig.png
noel gordon
Comment 3 2012-05-17 22:33:52 PDT
Created attachment 142631 [details] Screen shot: Safari-5.1.5-left and Chrome-20.0.1132.3-dev-right
noel gordon
Comment 4 2012-05-17 22:34:57 PDT
Safari gets it right, and so does Mozilla 3.6+
noel gordon
Comment 5 2012-05-18 01:52:09 PDT
The images on the URL page are Creative Commons Attribution-NonCommercial 2.5 License. http://creativecommons.org/licenses/by-nc/2.5 I wrote to the page owner asking for permission to use the images. Reply attached.
noel gordon
Comment 6 2012-05-18 01:54:11 PDT
Created attachment 142664 [details] png-colortest-html-images-webkit-test-use.txt
noel gordon
Comment 7 2012-05-18 02:15:48 PDT
+brian per comment #5 #6, ok to use of these images in your view?
Greg Roelofs
Comment 8 2012-05-18 11:38:02 PDT
I took the photo and created the images from scratch. Consider them licensed under CC-SA or an equivalent "use as you wish but share any modifications/derivations under the same terms" license. And if that doesn't cut it, let me know.
noel gordon
Comment 9 2012-05-22 20:51:50 PDT
Thank you Greg. WebKit is BSD licensed http://trac.webkit.org/browser/trunk/Source/WebKit/LICENSE and Brian would know if what you've said "cuts it" for us. I'll prepare a layout test patch, awaiting word on ok to use.
noel gordon
Comment 10 2012-05-23 00:14:17 PDT
Adam Barth
Comment 11 2012-05-23 10:55:16 PDT
Comment on attachment 143482 [details] Patch LGTM, assuming you're happy with the licensing terms.
noel gordon
Comment 12 2012-06-05 23:10:02 PDT
Created attachment 145939 [details] paletted-color-gamma-one-color-profile-image-info Ah well, no answers: created a paletted PNG image in photoshop with a gamma-1.0 RGB color profile for this test. Image and profile details in the attachment.
noel gordon
Comment 13 2012-06-05 23:13:49 PDT
Created attachment 145940 [details] test image in chrome 21, safari 5.1.7, firefox 12 Chrome clearly does not color correct this image.
noel gordon
Comment 14 2012-06-05 23:15:27 PDT
WebKit Review Bot
Comment 15 2012-06-06 19:33:10 PDT
Comment on attachment 145941 [details] Patch Clearing flags on attachment: 145941 Committed r119664: <http://trac.webkit.org/changeset/119664>
WebKit Review Bot
Comment 16 2012-06-06 19:33:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.