Changeset 73112 in webkit


Ignore:
Timestamp:
Dec 2, 2010 12:05:30 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2010-12-02 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Gray-scale JPEG images with a color profile are stretched horizonally
https://bugs.webkit.org/show_bug.cgi?id=49950

Turns out gray-scale JPEGs with color profiles have the same issue as
PNGs. As with PNGs, we suppress now suppress the color profile for
gray-scale JPEGs. Most importantly, this patch adds a test.

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

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp: (WebCore::JPEGImageReader::decode):

2010-12-02 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Gray-scale JPEG images with a color profile are stretched horizonally
https://bugs.webkit.org/show_bug.cgi?id=49950

Test that we properly render gray-scale JPEGs with embedded color
profiles.

  • fast/images/gray-scale-jpeg-with-color-profile.html: Added.
  • fast/images/resources/flowchart.jpg: Added.
  • platform/mac/fast/images/gray-scale-jpeg-with-color-profile-expected.txt: Added.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73111 r73112  
     12010-12-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Gray-scale JPEG images with a color profile are stretched horizonally
     6        https://bugs.webkit.org/show_bug.cgi?id=49950
     7
     8        Test that we properly render gray-scale JPEGs with embedded color
     9        profiles.
     10
     11        * fast/images/gray-scale-jpeg-with-color-profile.html: Added.
     12        * fast/images/resources/flowchart.jpg: Added.
     13        * platform/mac/fast/images/gray-scale-jpeg-with-color-profile-expected.txt: Added.
     14
    1152010-12-01  Daniel Bates  <dbates@rim.com>
    216
  • trunk/WebCore/ChangeLog

    r73094 r73112  
     12010-12-02  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Gray-scale JPEG images with a color profile are stretched horizonally
     6        https://bugs.webkit.org/show_bug.cgi?id=49950
     7
     8        Turns out gray-scale JPEGs with color profiles have the same issue as
     9        PNGs.  As with PNGs, we suppress now suppress the color profile for
     10        gray-scale JPEGs.  Most importantly, this patch adds a test.
     11
     12        Test: fast/images/gray-scale-jpeg-with-color-profile.html
     13
     14        * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
     15        (WebCore::JPEGImageReader::decode):
     16
    1172010-12-01  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/WebCore/platform/image-decoders/ImageDecoder.h

    r72341 r73112  
    317317        virtual bool supportsAlpha() const { return true; }
    318318
     319        void setIgnoreGammaAndColorProfile(bool flag) { m_ignoreGammaAndColorProfile = flag; }
     320
    319321        // Whether or not the gamma and color profile are applied.
    320322        bool ignoresGammaAndColorProfile() const { return m_ignoreGammaAndColorProfile; }
  • trunk/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

    r72341 r73112  
    209209            switch (m_info.jpeg_color_space) {
    210210            case JCS_GRAYSCALE:
     211            case JCS_YCbCr:
     212                // Grayscale images get "upsampled" by libjpeg.  If we use
     213                // their color profile, CoreGraphics will "upsample" them
     214                // again, resulting in horizontal distortions.
     215                m_decoder->setIgnoreGammaAndColorProfile(true);
     216                // Note fall-through!
    211217            case JCS_RGB:
    212             case JCS_YCbCr:
    213218                m_info.out_color_space = JCS_RGB;
    214219                break;
Note: See TracChangeset for help on using the changeset viewer.