Bug 312551

Summary: showFoto displays camera jpegs with AdobeRGB DCF information with a blue color cast
Product: [Applications] digikam Reporter: Elle Stone <elle>
Component: ColorManagement-ProfilesAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, ellestone, metzpinguin, vivo75+kde
Priority: NOR    
Version: 2.9.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
URL: http://ninedegreesbelow.com/temp/digikam-DCF-bug-report.html
Latest Commit: Version Fixed In: 5.8.0
Sentry Crash Report:
Attachments: A solid white test jpeg.

Description Elle Stone 2013-01-03 16:20:35 UTC
When opening a digital camera jpeg with embedded Adobe RGB DCF information, the image is displayed with a strong blue color cast. When opening a digital camera jpeg with embedded sRGB DCF information, the image is displayed correctly. When saving the images, the Adobe image gets a scarse adobe profile. The sRGB image gets an lcms-generated profile. 

Using Gimp to assign "ClayRGB.icm" to the Adobe camera jpeg makes the image display correctly.

Reproducible: Always

Steps to Reproduce:
1. Use showFoto to open a digital camera jpeg with embedded DCF Adobe color space information.
2. Look at the image.
3. Save the image.
Actual Results:  
The image is displayed with a strong blue color cast.

Expected Results:  
The image shouldn't have a color cast.

From the Canon 400D camera jpeg:
Interoperability Index          : R03 - DCF option file (Adobe RGB)

After saving with showFoto:
Red Matrix Column               : 0.57668 0.29735 0.02704
Green Matrix Column             : 0.18556 0.62737 0.07069
Blue Matrix Column              : 0.18823 0.0753 0.99135

Those don't look like the right primaries for AdobeRGB-like profiles.
Comment 1 caulier.gilles 2013-01-03 17:55:17 UTC
To reproduce here, we needs original image and color profile files.

Also, which version of lcms you use ? Go to Help/Components Info for details.

Which CPU you use ?

Gilles Caulier
Comment 2 Elle Stone 2013-01-03 19:45:29 UTC
On 1/3/13, Gilles Caulier <caulier.gilles@gmail.com> wrote:
> To reproduce here, we needs original image and color profile files.
The image files and the ClayRGB1998.icm profile can be downloaded from here:
http://ninedegreesbelow.com/temp/digikam-DCF-bug-report.html

> Also, which version of lcms you use ?
I have lcms 1.19 and lcms2 2.4 installed on my system. showFoto is
using 1.19. I put the full components information in the web page.

> Which CPU you use ?
I'm not sure what you mean by CPU. The CPU on the motherboard is an
AMD opteron 252 processor, single core, 64-bit.

Elle
Comment 3 Elle Stone 2013-08-20 16:32:27 UTC
Created attachment 81812 [details]
A solid white test jpeg.

This is a solid white test jpeg. All RGB values are (255,255,255). When a proper ICC working space profile is assigned to this image, it should look white, not blue-green.
Comment 4 Elle Stone 2013-08-20 16:36:23 UTC
It seems that digiKam/Showfoto properly reads the embedded metadata to detect that the image is supposed to be in the Adobe color space. The problem seems to be that digiKam/Showfoto then assigns this color space profile: /usr/share/apps/libkdcraw/profiles/adobergb.icm. That adobe profile is defective. It uses non-adapted primaries (http://brucelindbloom.com/ - read down to the section called "Adapted Primaries"). If you assign this defective adobe profile to a solid white jpeg (see attached solid white test jpeg), the jpeg will turn blue-green.

Two other profiles in the libkdcraw/profiles folder are also defective in the same way: applergb.icm and srgb.icm both have unadapted primaries and will turn a solid white jpeg blue-green if assigned.

I replaced the defective adobe profile with the argyllcms "clayrgb" profile (changing the name), and Showfoto then properly opened a test camera-generated jpeg that was saved in the adobe color space.
Comment 5 caulier.gilles 2014-08-23 11:52:27 UTC
Elle,

This problem still valid using last digiKam 4.2.0 ?

Gilles Caulier
Comment 6 Elle Stone 2014-08-23 16:47:45 UTC
(In reply to Gilles Caulier from comment #5)
> Elle,
> 
> This problem still valid using last digiKam 4.2.0 ?
> 
> Gilles Caulier

Gilles, unfortunately digikam 4.2.0 is hard-masked in Gentoo portage and my efforts to install it locally failed with errors. So I can't check. My apologies!
Comment 7 caulier.gilles 2016-07-04 16:51:50 UTC
This problem still reproducible with digiKam 5.0.0 ?

Gilles Caulier
Comment 8 caulier.gilles 2016-11-25 17:28:53 UTC
What's about this file using digiKam AppImage bundle 5.4.0 pre release given at
this url :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier
Comment 9 Elle Stone 2017-10-29 17:13:09 UTC
(In reply to caulier.gilles from comment #7)
> This problem still reproducible with digiKam 5.0.0 ?
> 
> Gilles Caulier

Checking digiKam 5.7.0, this no longer appears to be a problem. I seem to recall the actual problem was with profiles supplied by some other KDE package, and those profiles have been fixed. My apologies for taking so long to check digiKam - I had completely forgotten about this bug report.
Comment 10 Maik Qualmann 2017-10-29 17:49:19 UTC
Thanks for the feedback.

Maik