Bug 86722 - Add a test for PNG COLOR_TYPE_PALETTE image with a color profile
Summary: Add a test for PNG COLOR_TYPE_PALETTE image with a color profile
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: noel gordon
URL: http://www.libpng.org/pub/png/png-col...
Keywords:
Depends on:
Blocks: 101551
  Show dependency treegraph
 
Reported: 2012-05-17 05:43 PDT by noel gordon
Modified: 2012-11-11 19:38 PST (History)
7 users (show)

See Also:


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 Details
png-colortest-html-images-webkit-test-use.txt (493 bytes, text/plain)
2012-05-18 01:54 PDT, noel gordon
no flags Details
Patch (51.08 KB, patch)
2012-05-23 00:14 PDT, noel gordon
no flags Details | Formatted Diff | Diff
paletted-color-gamma-one-color-profile-image-info (42.47 KB, image/png)
2012-06-05 23:10 PDT, noel gordon
no flags Details
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 Details
Patch (8.54 KB, patch)
2012-06-05 23:15 PDT, noel gordon
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description noel gordon 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.
Comment 2 noel gordon 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
Comment 3 noel gordon 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
Comment 4 noel gordon 2012-05-17 22:34:57 PDT
Safari gets it right, and so does Mozilla 3.6+
Comment 5 noel gordon 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.
Comment 6 noel gordon 2012-05-18 01:54:11 PDT
Created attachment 142664 [details]
png-colortest-html-images-webkit-test-use.txt
Comment 7 noel gordon 2012-05-18 02:15:48 PDT
+brian per comment #5 #6, ok to use of these images in your view?
Comment 8 Greg Roelofs 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.
Comment 9 noel gordon 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.
Comment 10 noel gordon 2012-05-23 00:14:17 PDT
Created attachment 143482 [details]
Patch
Comment 11 Adam Barth 2012-05-23 10:55:16 PDT
Comment on attachment 143482 [details]
Patch

LGTM, assuming you're happy with the licensing terms.
Comment 12 noel gordon 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.
Comment 13 noel gordon 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.
Comment 14 noel gordon 2012-06-05 23:15:27 PDT
Created attachment 145941 [details]
Patch
Comment 15 WebKit Review Bot 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>
Comment 16 WebKit Review Bot 2012-06-06 19:33:16 PDT
All reviewed patches have been landed.  Closing bug.