koffice/krita

Adrian Page adrian at pagenet.plus.com
Tue Jul 26 22:36:08 CEST 2005


Bart Coppens wrote:
> On Tuesday 26 July 2005 15:20, Boudewijn Rempt wrote:
> 
>>The correct way is to apply the exposure parameter during the composition,
>>I think, just like the profile.
> 
> Hmmmm yes, but I'm not convinced: we use the profile with blitting only to 
> convert between layers with different profiles/strategies. I don't think it 
> makes much sense to do this there. Come to think of it, the same applies to 
> painting wetness effects: this would preferably not be painted each 
> individual layer...
> I'm starting to get confused as to what we should have at which places 
> here :-/

I don't know how this relates to the wetness issues, but I see hdr 
working like this:

If the image type is hdr, i.e. the KisImage projection is hdr, then 
exposure should only be applied at the convertToQImage point. The 
exposure is just used to generate a preview of the full hdr image (using 
  Photoshop's terminology). It has no effect on compositing hdr layers 
over hdr layers.

If the image type is ldr, and it has hdr layers, then as part of the 
flattening process to generate the ldr projection, some sort of 
conversion from hdr to ldr must be done. You could use exposure there 
but I think it might be preferable to simply clamp the colour values to 
ldr range. Using the exposure there makes less sense since it is a 
preview control and it can vary between views on the same image. To do a 
proper hdr to ldr conversion you use tone mapping operators (to give 
them their technical name) that use various algorithms to generate an 
ldr representation of a hdr image. Photoshop offers these when you 
convert a 32-bit image to 8 or 16-bit, which is a good place to put it. 
I intend to implement some of these algorithms so the user can choose 
which produces the best ldr conversion for them. Some of the algorithms 
take the surrounding area into account when converting a pixel, or 
indeed the overall levels of the whole image, so they can't be used for 
the automatic conversions that take place in, say, a toQRgb.

Given that, I think passing the exposure into convertToQImage is 
reasonable, despite its slight ugliness.

Another point to make is that 32-bit float RGBA will not be the only 
colour strategy using the exposure setting. It will be used by all high 
dynamic range colour models, and that will include at least a 32-bit 
float greyscale, and various 16-bit floating (and maybe a fixed, as used 
by CinePaint) point RGBA and grey.

Adrian



More information about the kimageshop mailing list