Re: [Gimp-developer] Possible approach for some non-sRGB GEGL/GIMP color workflows

On 05/24/2014 01:26 PM, Øyvind Kolås wrote:
I've been thinking about how different color-space aware workflows
could work in our future GEGL powered GIMP. In particular about the
on-going theme of how to deal with "slight HDR" images, that have a
gamut including colors that are slightly outside the 0.0-1.0 range for
linear sRGB.

I'm not sure what you mean by '"slight HDR" images, that have a gamut including colors that are slightly outside the 0.0-1.0 range for linear sRGB'.

Converting a display-referred ProPhotoRGB image that has colors that exceed the very small bounded sRGB color gamut, from ProPhotoRGB to unbounded mode sRGB, doesn't create a "slight HDR" image.

The dynamic range of the display-referred ProPhotoRGB image colors doesn't change when the image is converted to unbounded mode sRGB. Just the chromaticities used to encode the RGB data change.

In the unbounded mode sRGB color space the relationship between channel values and intensity is broken. The resulting image is neither display-referred nor magically made into "high dynamic range" scene-referred.

See "Unbounded mode sRGB is neither display-referred nor scene-referred",

The primary goal will still be adapting channel displays; histograms
etc. to encompass/translate to show the <0.0 and >1.0 values; in
relation to a defined target/output profile. A hybrid linear-centric
approach might also work well.

Is the "target/output profile" to which you are referring the *source* profile, meaning the ICC profile that the image was in before it gets forcibly converted to unbounded mode sRGB?

Or is the "target/output profile" the ICC profile to which the user intends to eventually convert the image, such as perhaps a printer profile?

What do you mean by "hybrid linear-centric approach"?

If we on import linearise the data (using the RGB primaries of the
source color space), and then scale values down based on the magnitude
of the most intense primary, and pretend that the resulting data is
"RGBA float"; there will neither be cross component contamination nor
"out-of-ui-range" values.

If you are talking about scaling the data so that any possible color in the source color space would fit into the very small bounded sRGB color gamut, that a pretty large scale factor for ProPhotoRGB.

I have not done actual experiments - to see the impact doing this
would have on the visual result,

I did an experiment. I downloaded Bruce Lindbloom's RGB16Million test image (, bumped the precision to 32-bit floating point, assigned the regular gamma=1.80 ProPhotoRGB ICC profile, and converted the image to linear gamma ProPhotoRGB.

Then I set Preferences/Color Management/Mode of operation to Print simulation, set the Print simulation profile to a linear gamma sRGB profile, and chose "Mark out of gamut colors".

Then I used Levels and moved the Output lower and upper sliders to 33.00 and 67.00, which just made the out of gamut colors disappear. The image was very desaturated with the dynamic range cut to a third.

Repeating the same procedure with actual images likewise produces extremely desaturated colors. And the channel data is *still rearranged*.

If you don't want to rearrange the channel data and you do want the image to be in the unbounded mode sRGB color space, you can *assign* the sRGB profile, in which case the channel data is preserved and the colors are completely wrongly interpreted.

it gives up some aspect of color
management -

Why should people who use GIMP be expected to give up any aspect of color management? The whole point of a color-managed workflow is to be able to see the image colors to the extent that the monitor profile's color gamut allows.

but deal correctly with the tone-response curves.
Could you explain what you mean?

suspect the dominant side effect will be a slight loss in luminance.

If there is code you would like tested or an experiment with images that you'd like to see done, but you don't have time to do the testing yourself, let me know and I'll try to do the testing for you.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]