Changeset 77724 in webkit


Ignore:
Timestamp:
Feb 4, 2011 7:05:47 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-02-04 Hironori Bono <hbono@chromium.org>

Reviewed by Adam Barth.

[chromium] JPEG corruption
https://bugs.webkit.org/show_bug.cgi?id=53250

This change adds a new script test that we can render a CMYK JPEG with a
color profile correctly, i.e. we can render it without color corruption.

  • fast/images/cmyk-jpeg-with-color-profile-expected.txt: Added.
  • fast/images/cmyk-jpeg-with-color-profile.html: Added.
  • fast/images/resources/cmyk-jpeg.jpg: Added.
  • fast/images/script-tests/cmyk-jpeg-with-color-profile.js: Added. (image.onload):

2011-02-04 Hironori Bono <hbono@chromium.org>

Reviewed by Adam Barth.

[chromium] JPEG corruption
https://bugs.webkit.org/show_bug.cgi?id=53250

Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
profiles from CMYK to RGB twice and it causes color corruption. This
change suppresses the color profiles for CMYK JPEGs same as gray-scale
ones.

Test: fast/images/cmyk-jpeg-with-color-profile.html

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::decode):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r77723 r77724  
     12011-02-04  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        [chromium] JPEG corruption
     6        https://bugs.webkit.org/show_bug.cgi?id=53250
     7
     8        This change adds a new script test that we can render a CMYK JPEG with a
     9        color profile correctly, i.e. we can render it without color corruption.
     10
     11        * fast/images/cmyk-jpeg-with-color-profile-expected.txt: Added.
     12        * fast/images/cmyk-jpeg-with-color-profile.html: Added.
     13        * fast/images/resources/cmyk-jpeg.jpg: Added.
     14        * fast/images/script-tests/cmyk-jpeg-with-color-profile.js: Added.
     15        (image.onload):
     16
    1172011-02-04  Martin Robinson  <mrobinson@igalia.com>
    218
  • trunk/Source/WebCore/ChangeLog

    r77716 r77724  
     12011-02-04  Hironori Bono  <hbono@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        [chromium] JPEG corruption
     6        https://bugs.webkit.org/show_bug.cgi?id=53250
     7
     8        Same as gray-scale JPEGs, we convert the colors of CMYK JPEGs with color
     9        profiles from CMYK to RGB twice and it causes color corruption. This
     10        change suppresses the color profiles for CMYK JPEGs same as gray-scale
     11        ones.
     12
     13        Test: fast/images/cmyk-jpeg-with-color-profile.html
     14
     15        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
     16        (WebCore::JPEGImageReader::decode):
     17
    1182011-02-04  Xiyuan Xia  <xiyuan@chromium.org>
    219
  • trunk/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

    r77429 r77724  
    223223                // to cmyk.
    224224                m_info.out_color_space = JCS_CMYK;
     225
     226                // Same as with grayscale images, we convert CMYK images to RGBA
     227                // ones. When we keep the color profiles of these CMYK images,
     228                // CoreGraphics will convert their colors again. So, we discard
     229                // their color profiles to prevent color corruption.
     230                m_decoder->setIgnoreGammaAndColorProfile(true);
    225231                break;
    226232            default:
Note: See TracChangeset for help on using the changeset viewer.