Re: [Gegl-developer] [Gimp-developer] babl roadmap



On 10/14/2014 08:50 AM, Simon Budig wrote:
for conversions between RGB working spaces there is no fundamental
distinction between XYZ and unbounded linear gamma sRGB.

There is one fundamental difference between XYZ as the real PCS and "sRGB as PCS" (those are scare quotes; the terminology "sRGB as PCS" is misleading at best):

Worked out step by step:

It takes one matrix multiplication to get from UserRGB to XYZ. The required matrix "A" is contained in the UsrRGB ICC profile colorants.

It takes a second matrix multiplication to get from XYZ to sRGB. The required matrix "C" is the inverse of the matrix contained in the sRGB ICC profile colorants.

A and C are both defined in terms of XYZ.

Once you have matrix A for getting from UserRGB to XYZ and matrix C for getting from XYZ to sRGB, you can concantenate the two multiplications into one matrix multiplication. This is because matrix multiplication is associative:

C*(A*B) = (C*A)*B, where B is the UserRGB RGB values that will be converted to sRGB (linearized RGB data is assumed).

One matrix multiplication or two, you still get to the same place.

But the required "one matrix to multiply" first has to be *calculated* using *two* matrices, both of which are defined in terms of the real PCS, which is XYZ.

Then you have to store the result of C*A in memory for future use.

Pippin wants to go through "sRGB as PCS" to get to XYZ.

In a sane color-managed editing application, it takes one matrix multiplication to get from UserRGB to XYZ, using matrix A.

In Pippin's "sRGB as PCS", first you convert from UserRGB to sRGB using the matrix that's the product of C*A, that you've previously stored somewhere in memory.

Then you convert from sRGB to XYZ using the inverse of C. Two conversions. Which of course can in turn be concantenated into one multiplication and also stored in memory for future use.

Kind regards,
Elle Stone
--
http://ninedegreesbelow.com
Color management and free/libre photography


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