exposure and gamma

Boudewijn Rempt boud at valdyas.org
Tue Jun 5 07:12:59 UTC 2012


So yesterday after a day of frantic hacking on the "lut-docker" I finally discovered that we're not using the mechanism I thought we were using for showing gamma/exposure...

Basically, we have two mechanisms in place:

* a glsl shader fragment for the opengl canvas
* a visitor to set exposure as a property on profiles that are used by ctlcs colorspaces.

The glsl shader only works with colorspaces that are marked as supporting hdr, and I guess the ctlcs colorspaces aren't marked as hdr to avoid the shader kicking in and doing the same transform twice.

The visitor approach means the entire image is recomposited as soon as the exposure changes. It is also used by the color selection selection system to automatically transform a selected color to work with the current exposure (http://blog.cberger.net/2007/12/01/painting-in-hdr-with-krita/, http://cyrille.diwi.org/images/kritablog/krita-painting-hdr.mpeg).

Now that we're trying to use lcms instead of ctlcs, the profile route won't work anymore, so we need something new.

I'm going to try this:

* for painting: when setting fg/bg color on the canvas resource provider, transform those for the gamma/exposure settings so painting on hdr works as it did.

* for display: 
** opengl: try to beat the shader back into working state and pass it the gamma settings as a variable.
** qpainter: use the gamma/exposure setting to create an lcms transform and apply that when generating the prescaled image.

Anything I've missed here?
-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the kimageshop mailing list