GNOME Bugzilla – Bug 337055
Brighten/darken should be more realistic
Last modified: 2008-01-15 13:06:34 UTC
When you use the brightness/contrast feature in GIMP (in layer > colors > brightness/contrast) is not sufficient for realistically brightening or darkening an image. Take a dark brown, the color 603018. At full impact of this feature, it becomes E0B098, a heavily grayed out color. [url=http://www.ulillillia.us/images/bighousemess3.jpg]This underexposed photo[/url] gives you a good idea on why this is handy. It is about 45% darker than it should be. Using the brightness/contrast feature puts a lot of gray into the image further washing it out rather than actually changing the actual brightness. To more realistically brighten or darken an image, the RGB colors should be multiplied by a given factor. At 1, the lowest suggested value, there is no change. At 10, the highest suggested value, the change is extreme. Two decimal places of precision should be enough. Values returned after the multiplication should be rounded to the nearest integer (done by adding 0.5 then dropping the trash after the decimal). If above 255, the color should be set to 255. Two radio buttons should be there to choose between brighten (multiply by given factor) or darken (divide by given factor). For example, to get that photo near true color, I'd need to multiply each RGB color by 2.22222 (a 20:9 ratio) and be sure the "brighten" option is selected. Doing this will very accurately and correctly (mathematically) brighten the photo to near true color (fine adjustments will be needed of course). This helps with underexposed photos (and overexposed ones as well). It also helps in other cases as well. By using this adjustment factor, the color 603018 becomes D56B35 (after 213.33333, 106.66667, and 53.33333) which is a much more realistic brightening fact. How I envision the interface is a slider on the top going from 1 to 10 with two decimal places with the value edittable by typing it in manually. An aspect ratio can also be used. Below that are two radio buttons, brighten and darken. Brighten brightens the image* by multiplying pixel colors by the given factor, and darken darkens the image* by dividing pixel colors by the given factor. Previewing the effect in the image window will also be nice. * "image" refers to the current selection in the current layer, or, if there is no selection, the entire layer.
I don't know how to edit mistakes, but that link should be this instead without the [url= stuff: http://www.ulillillia.us/images/bighousemess3.jpg
It's a well-known fact that the Brightness/Contrast tool is rather bad. That's why everyone is using Levels and/or Curves instead. I don't really understand what your bug-report is asking for? Can you please try to summarize your request in no more than five lines. Or alternatively, send a patch.
What I'm asking for is this in a 4 1/3-line summary (between the /* and */ markers): /* Brightness/contrast should use a factor to alter the colors with by multiplying (to brighten) or dividing (to darken) the RGB color values by this factor (1 or above). This can enhance underexposed photos. The factor ranges from 1 (no change) to 10 (extreme). You choose between "brighten" (multiply) or "darken" (divide) with radio buttons. */ Additional details: The current system, now that I've studied it, darkens by using black with an alpha of whatever setting you have (as if you had a transparent black layer on top with the alpha at whatever setting you use). It brightens using white instead. White is just another shade of gray (as you can go brighter) and this washes out the image. This enhancement request provides a much more accurate way to realistically brighten an image without the washed-out look. Here are 6 images to explain the effects: http://www.ulillillia.us/temporary/brightness1.png - original http://www.ulillillia.us/temporary/brightness2.png - half as bright (darken by factor of 2) http://www.ulillillia.us/temporary/brightness3.png - quarter as bright (darken by factor of 4) http://www.ulillillia.us/temporary/brightness4.png - 1/8 brightness (darken by factor of 8) http://www.ulillillia.us/temporary/brightness5.png - brighten using current method (half-transparent white) http://www.ulillillia.us/temporary/brightness6.png - brighten using bucket fill with white with opacity at 87.5% (repeat brighten 3 times to simulate). It otherwise would take too long (on the order of days and weeks) to manually alter the colors to brighten the images here. The method I'm suggesting in the bug report is that, if I took the second image and brightened it by a factor of 2, you'd get about what you see in first image. If you brightened the fourth image by a factor of 4, you would get what is in the second image. It's a much more accurate and realistic way to brighten an image.
We can't just change the effect of the Brightness/Contrast tool. The current effect is what it does and I don't see why we should change it. Especially if the suggested effect can already be achieved with an existing tool. Do we really need yet another tool?
The approach you suggest has a severe flaw, it maps to color values outside the gamut of the colorspace and thus requires clipping. This is not an option. Also the brightness/contrast routines are what the user expects from these functions. They represent the established color mapping functions for brightness/contrast adjustments. I am closing this bug report as INVALID now. Feel free to write a plug-in that implements the suggested color adjustments. If it turns out to be actually useful, we can still consider to implement that plug-in as a tool.