GNOME Bugzilla – Bug 38649
gamma correction is not supported
Last modified: 2007-10-27 18:30:04 UTC
Package: gimp Version: 1.2.1 Name...........: Roland Baudin Email..........: roland.baudin@francetelecom.fr Platform.......: HP Kayak, Linux RedHat 7.0 GIMP Version...: 1.2.1 GTK Version....: 1.2.8 WM/Version.....: sawfish 0.33.1 --- Problem description: The mechanism of gamma correction doesn't work in gimp 1.2.1. Any value of gamma set with the line : (gamma-correction 2.0) in gimprc (local or global) doesn't lead to any change in image display. A quick invetsigation in the sources has convinced me that the global variable gamma_val is NEVER USED! This means the gamma correction isn't implemented at all? --- ------- Additional Comments From sven@gimp.org 2001-01-25 10:38:07 ---- Subject: Re: Bug#38649: [gimp-bug] gamma correction don'work From: Sven Neumann <sven@gimp.org> To: 38649@bugs.gnome.org Cc: roland.baudin@francetelecom.fr Message-Id: <87elxrbq1s.fsf@gimp.org> Date: 25 Jan 2001 16:38:07 +0100 roland.baudin@francetelecom.fr writes: > --- Problem description: > The mechanism of gamma correction doesn't work in gimp 1.2.1. > Any value of gamma set with the line : > (gamma-correction 2.0) > in gimprc (local or global) doesn't lead to any change in image display. > A quick invetsigation in the sources has convinced me that the global variable > gamma_val is NEVER USED! > This means the gamma correction isn't implemented at all? > Yes, that's what it means. Actually a few plug-ins (namely PNG) use the value through the libgimp function gimp_gamma(). Salut, Sven ------- Bug moved to this database by debbugs-export@bugzilla.gnome.org 2001-01-28 11:10 ------- This bug was previously known as bug 38649 at http://bugs.gnome.org/ http://bugs.gnome.org/show_bug.cgi?id=38649 Originally filed under the gimp product and general component. Unknown version 1.2.x in product GIMP. Setting version to the default, "unspecified". The original reporter (roland.baudin@francetelecom.fr) of this bug does not have an account here. Reassigning to the exporter, debbugs-export@bugzilla.gnome.org. Reassigning to the default owner of the component, egger@suse.de.
And we probably won't introduce that into 1.2.* anymore.
I think that it would be more appropriate to re-open this bug as a suggested enhancement for a future version (Current CVS). Although the PNG plug-in uses the gamma value, the following comment from the global gimprc in 1.2.2 would imply that the Gimp itself uses this value when displaying all images: # Set the gamma correction values for the display # 1.0 corresponds to no gamma correction. For most displays, # gamma correction should be set to between 2.0 and 2.6 # Run the utility "gamma_correct" to determine appropriate values # for your display. [
GIMP should probably store a default set of display filters. Since we have a working gamma display filter, this would solve the problem nicely.
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
Bumping to 2.2.
Color management won't make it into 2.2 unfortunately and that's where we will want to implement gamma correction.
*** Bug 158123 has been marked as a duplicate of this bug. ***
Note that GIMP also writes gamma 2.2 into all PNG files regardless of actual gamma, and regardless of whether user selects 'save gamma' or NOT in the save dialogue. This makes it unsuitable for working with images.
Hm, in 2.2 Pre2 the gamma-writing part of the code is only executed if the "Save Gamma" button is checked. What version of GIMP are you using?
Gee, 2001-01-25 was a long time ago. Much has changed since then. I think one needs to remember that "perfect" is the enemy of good. Here in 2005, there are two kinds of gamma: linear and sRGB. Years ago, the non-linear stuff was standardized. Note that the sRGB gamma curve is not a simple exponent, so it does need to be a special case. Since the only other choice in widespread use is linear, a boolean will do. Screens are sRGB. Image manipulation nearly always requires linear. Most file formats (PNM, unmarked PNG, GIF) are implicitly sRGB. So this pretty much tells what must be done: convert to linear as the file is loaded (a few formats excepted), and convert back to sRGB the image is saved. Once the gimp can use 32-bit floats, out-of-gamut colors are easily handled with values outside the 0.0 to 1.0 range. So there is no serious need to worry about that, provided that 32-bit channels are coming eventually.
*** Bug 168022 has been marked as a duplicate of this bug. ***
*** Bug 304254 has been marked as a duplicate of this bug. ***
This report is all so vague and now that we have a color managed display it is also not any longer reasonable to keep it open. If a specific change needs to be done, feel free to open a new bug report and point out exactly what should be changed. Preferably, discuss it beforehand on the gimp-developer mailing-list. Closing as OBSOLETE.