Index: WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp |
=================================================================== |
--- WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (revision 73242) |
+++ WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (working copy) |
@@ -208,8 +208,13 @@ |
// Let libjpeg take care of gray->RGB and YCbCr->RGB conversions. |
switch (m_info.jpeg_color_space) { |
case JCS_GRAYSCALE: |
+ case JCS_YCbCr: |
+ // Grayscale images get "upsampled" by libjpeg. If we use |
+ // their color profile, CoreGraphics will "upsample" them |
+ // again, resulting in horizontal distortions. |
+ m_decoder->setIgnoreGammaAndColorProfile(true); |
+ // Note fall-through! |
case JCS_RGB: |
- case JCS_YCbCr: |
m_info.out_color_space = JCS_RGB; |
break; |
case JCS_CMYK: |