Bug 193152 - JPEG image gets displayed in wrong colors
Summary: JPEG image gets displayed in wrong colors
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml image part (show other bugs)
Version: 0.0.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: testcase, triaged
Depends on:
Blocks:
 
Reported: 2009-05-18 21:16 UTC by Andreas Pietzowski
Modified: 2009-11-29 09:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
JEPG shows wrong colors in KMail (937.98 KB, image/jpeg)
2009-05-18 21:18 UTC, Andreas Pietzowski
Details
testcase tar'ed up (950.00 KB, application/x-tar)
2009-06-20 16:04 UTC, Florian Reinhard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pietzowski 2009-05-18 21:16:21 UTC
Version:           1.11.3 (using 4.2.3 (KDE 4.2.3), Kubuntu packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.28-11-generic

Sometimes I recognized that kmail displays JPEGs with false colors. Now I got again a jpeg which is shown in orange instead of blue. I will attach a file in my next post.
Comment 1 Andreas Pietzowski 2009-05-18 21:18:17 UTC
Created attachment 33818 [details]
JEPG shows wrong colors in KMail

Konqueror and GIMP displays it correct in blue, KMail shows it orange with a kind of layering-problem. Does this JPEG have some "layers"? Anyways, it should be displayed correct ;-)
Comment 2 Christoph Feck 2009-05-19 02:23:56 UTC
This is a CMYK jpeg image, Qt loads it correctly, but KHTML part uses its own jpeg image loader. Reassigning.
Comment 3 Christoph Feck 2009-05-19 02:26:32 UTC
Showing directly the image works, but not if embedded inside a document. To reproduce in Konqueror, I used this simple document:

<HTML>
<body>
<p>Text</p>
<img src="logo_final_blau.jpg" />
</body>
</HTML>
Comment 4 Florian Reinhard 2009-06-20 16:03:20 UTC
still present in 4.2.91 with qt 4.5.1
Comment 5 Florian Reinhard 2009-06-20 16:04:13 UTC
Created attachment 34681 [details]
testcase tar'ed up
Comment 6 Christoph Feck 2009-11-10 23:58:37 UTC
SVN commit 1047308 by cfeck:

Fix loading of CMYK jpeg images

BUG: 135789
BUG: 189414
BUG: 193152


 M  +13 -0     jpegloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1047308
Comment 7 Brendon Higgins 2009-11-14 13:57:32 UTC
Hi,

I'm trying to understand this code fix. Where is the colourspace conversion from CMY to RGB? I see where the K part is used, but as best I can tell, the C, M, and Y components (after normalisation by the K component) are being fed into the R, G, and B inputs of the qRgb object. I surmise that jpeglib does some conversions, but not that. So this fix looks incomplete. Am I missing something? (Sorry if I am.)

Peace,
Brendon
Comment 8 Christoph Feck 2009-11-29 09:35:41 UTC
Brendon, the code comes from digikam. I checked Qt, and it basically has the same code. I tried all test images I could get from the three bug reports mentioned in the commit, and all display with correct colors.

If you have a JPEG image that displays correctly elsewhere, but not in Konqueror, please reopen.