On Sat, Feb 20, 2010 at 11:27:28PM +0100, Pascal de Bruijn wrote: > > When I apply UFRaw's internal 'Color Matrix' with gamma/linearity 1/1 > I get a darkish image, and when I apply my color profile (which in > essence is only a color matrix as well), with gamma/linearity 1/1, it > get a bright "normal looking" image. > > Can anybody explain this?
Yes, I think so. But it's a bit of a long answer. When you select the input profile as 'No Profile' or 'Color Matrix', the colour management system knows nothing about the gamma of the input data; it's up to you to translate the raw linear gamma to the output space by using ufraw's gamma and linearity settings, which are applied to the data before it gets to the CMS. Since you set these to 1, no conversion gets done, so you're seeing the linear data without any gamma applied. When you select the matrix-based profile generated by Argyll, I expect this includes metadata which defines the gamma of the input and output colourspaces - probably both linear. So now, although you're still not doing gamma adjustment through the direct ufraw settings, the CMS now knows that its input was linearly encode, and will automatically translates to the gamma of the output colourspace. This overlap between ufraw's own gamma handling and that done by the CMS is something I'd like to see cleaned up, but there are some problems with doing so. In theory all the gamma work could be done by the CMS - we have had a patch to do this - but in practice LCMS gave poor results in the shadows when given linear input data. Applying gamma to linearise in perceptual space, before feeding to the CMS, avoids this problem. Still, I think that gamma controls could be clarified. The only reason for needing direct control of the *input* gamma is to work with profiles based on data with a gamma pre-applied. Many manufacturer-provided profiles fall in this category, as will those which people have generated using UFRaw and gamma/linearity settings other than 1/1. So I think these settings should be available, but under a 'Apply gamma function before use' setting associated with each profile. We can leave the rest to the CMS, including application of the color matrix. It is straightforward to convert this to a profile on the fly, and there has already been a patch to do this too. The main reason this work has been held back is the shadow issue, but even if this does not get fixed in the CMS, it is straightforward to work around - just always convert linear data to a standard perceptual gamma ourselves before giving it to the CMS. Martin ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ ufraw-devel mailing list ufraw-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ufraw-devel