Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Unified Diff: WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

Issue 5635002: Merge 73112 - 2010-12-02 Adam Barth <abarth@webkit.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/platform/image-decoders/ImageDecoder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « WebCore/platform/image-decoders/ImageDecoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698