Bug 725960

Summary: gimp: corruption of color profile information in PNG files
Product: [openSUSE] openSUSE 12.1 Reporter: Jan Engelhardt <jengelh>
Component: GNOMEAssignee: E-mail List <gnome-bugs>
Status: VERIFIED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: forgotten_jJcEksif_g, vuntz
Version: Factory   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: my test png
file outputted by gimp with sRGB chunk
how rainbow2.png is essentially rendered

Description Jan Engelhardt 2011-10-22 16:54:16 UTC
I have a system color profile defined and loaded on xfce startup (seems to use argyllcms for loading it). Now, whenever I save a PNG file in gimp, gimp adds an sRGB chunk to it, thereby "falsifying" the color in applications which can interpret the sRGB chunk. This is despite Gimp's Preferences dialog having color management disbabled as per

Mode of operation: Color managed display
RGB profile: none
CMYK profile: none
Monitor profile: none
[ ] Try to use the system monitor profile
Display rendering intent: Perceptual
Print simulation profile: None
Softproof rendering intent: Perceptual
[ ] Mark out gamut colors
File Open behavior: Ask what to do (it does not ask anything)

How to reproduce:
1. load a color profile with argyllcms/dispcalGUI
2. (rm -Rf ~/.gimp-2.6 to reset prefs to show that it also occurs _in the default install_)
3. open a png file that has no sRGB chunk into gimp
4. save it to a new file, also as png

The new file will have an sRGB chunk and thus renders differently in e.g. firefox.
Comment 1 Jan Engelhardt 2011-10-22 16:55:07 UTC
Created attachment 458360 [details]
my test png
Comment 2 Jan Engelhardt 2011-10-22 16:56:16 UTC
Created attachment 458361 [details]
file outputted by gimp with sRGB chunk
Comment 3 Jan Engelhardt 2011-10-22 16:57:16 UTC
Created attachment 458362 [details]
how rainbow2.png is essentially rendered
Comment 4 Vincent Untz 2011-10-24 12:33:48 UTC
Can you take a screenshot of the option dialog when you save the file? I think there might be some box to uncheck there...
Comment 5 Forgotten User jJcEksif_g 2011-10-24 13:34:01 UTC
Jan,

do you have the CompICC plugin running? Thats the only way to have a colour managed display. dispcal (GUI) sets up a calibration, which is a kind of color improvement and attaches a ICC profile to describe the actual colorimetric state of the monitor. The difference between calibration and colour correction is described here:
http://www.argyllcms.com/doc/calvschar.html

To Gimp. Colour management tries to first describe all involved input, intermediate and output colour spaces through ICC profiles. In a second step the ICC profile should get used for on the fly non destructive colour correction. In that sense Gimp correctly assigns a default ICC profile to your image (input), which is widely considered to be sRGB.

In case you use CompICC for whole screen colour correction, then it is possible that Gimp colour management settings ignore the systems monitor profile, which is bad practice and to be considered wrong. That can indeed result in double colour correction and is a bug in Gimp. Use following:
[x] Try to use the system monitor profile

I am not sure, which sense it makes disabling colour management in Gimp.
Comment 6 Jan Engelhardt 2011-10-24 14:24:16 UTC
Turns out the falsification effect is a result of programs other than gimp doing imprecise rendering. color.org has a few sample images that allowed me to conclude that gimp is doing the right thing as far as I am concerned.