New color conversion system

Cyrille Berger cberger at cberger.net
Thu Sep 20 11:01:57 CEST 2007


> >  * quick and dirty, do the fallback in LAB32Float
> >  * leave to colorspace to define a list of convertion they can make, and
> > have the possibility to link them. For instance, XYZf32 says he can
> > convert to {XYZ16, RGB16f|32f} and RGB32f says he can convert to { RGB8 }
> >
> > So if we want XYZf32 to convert to RGB32f, the convertion will be handled
> > by XYZf32 and it wouldn't lose the HDR information.
> >
> > This is a purely theorical case:
> > But if we want to do XYZf32 to RGB8, the system will propose XYZf32 to
> > RGB32f to RGB8 .
> > The problem with that system is that if XYZ16f offers transformation to
> > RGB8 (and it does as they are both lcms colorspace), then we have two
> > options to convert XYZf32 to RGB8, either XYZf32 to RGB32f to RGB8 and
> > XYZf32 to XYZ16 to RGB8. Ideally that would give the same results, but I
> > am not so sure.
>
> We'd have to sort the paths by preference. This is conceptually a lot like
> the KOffice filter chains, isn't it? Maybe we can re-use some of that code
> to implement the color conversion chain preferences.
Yes. Anyway, acyclic graph isn't very difficult. The problem is to find the 
correct heuristic to determine which path is the best. And the shortest is 
not necesseraly the better. All colorspace have to be able to convert to/from 
LAB16 (and to/from RGB16 for that matter), so the shortest solution will 
allways be at a maximum of 2 color convertions.

> > This solution is more complicated, but it's also more or less how I
> > understand lcms and other color management systems are working.
> >
> > So what do you think guys ?
>
> I think color conversion chains are the way to go, although implementing
> float for lcms will win us more friends. We'd still need conversion chains,
> though
And we had need to understand lcms code :/ (understanding the API is allready 
quiet a big job for my little brain)

> However, given the short time to 2.0, couldn't we just implement a single
> rgb float to xyz float conversion and use that for tonemapping?
How short are we ? We still have three monthes of alpha on the planning. And I 
had say that finishing pigment is a top priority for 2.0.

-- 
Cyrille Berger


More information about the kimageshop mailing list