[cairo] Color, Cairo and Cups

Billy Biggs vektor at dumbterm.net
Fri Mar 10 00:43:08 PST 2006


Russell Shaw (rjshaw at netspace.net.au):

> Billy Biggs wrote:
> > Russell Shaw (rjshaw at netspace.net.au):
> >>It's really insane to make the data non-linear for anything other than
> >>at the final output to a display device, or to linearize the input from
> >>an input device.
> >
> >   I'm not sure exactly what you're getting at.
> >
> >   I would agree that the idea of normalizing to the sRGB chromaticities
> > only makes sense if you're accepting floating-point linear RGB, assuming
> > that Larry has linear data.
> >
> >   In general I think cairo needs to keep using 8-bit per channel sRGB
> > colours, with their specified gamma curve, since that's a reasonable
> > default for digital images and user interface colours.
> 
> For mathematical operations to work right, gamma correction should be
> done on RGB data so that any nonlinear light-input vs voltage-output
> on input devices such as cameras are linearized. After the data is
> transformed in various ways, it should gamma "nonlinearized" to
> compensate for nonlinear intensity vs voltage of output devices such
> as CRTs.

  Of course, but as cairo is used for user interfaces, it is mostly
sRGB -> (cairo) -> sRGB, and so optimizing this to never touch the pixel
values is important.

  -Billy



More information about the cairo mailing list