[Xr] API questions

Keith Packard keithp at keithp.com
Mon Jun 9 11:04:54 PDT 2003


Around 10 o'clock on Jun 9, Bill Spitzak wrote:

> I would recommend that Xr offer only sRGB. (see www.srgb.org for details) As 
> soon as you introduce other color spaces you end up with useless complexity 
> as any such conversion can be done by a program before calling Xr.

Yes, that's certainly the current plan.  One issue is that sRGB limits the 
gamut of the system to approximately that of monitors, so printing support 
will be limited somewhat.

However, the complexity of adding multiple color space support is not 
without substantial cost, so we'll have to see a real need for it before 
adding that to the library.

We'll probably get Xr using the XDCCC stuff so that it can offer true sRGB
for calibrated monitors.  That'll require gamma-corrected compositing in
the underlying rendering engines which RENDER doesn't currently support.

> To allow devices to support any color space Xr does have to offer an 
> interface that allows sRGB to be specified with values outside the 0-1 range. 
> Not all interfaces need to, just for instance a floating-point one.

Hmm.  That's just crazy enough that it might work.  I'll have to think how 
this would affect the compositing algebra.

> *maybe* the floating point interface should be in "linear sRGB". This is the 
> same whitepoint and viewing conditions as sRGB, but does not include the 
> gamma lookup function and thus luminance is in a linear relationship to the 
> value.

Yeah, maybe.  But, as most applications currently present RGB values in 
non-linear space, I'm not sure that's the best idea.  I think we should 
use regular sRGB everywhere and do gamma corrected compositing.

> I would like to see an interface that allows a color+alpha to be specified by 
> a single 32-bit number, with 8 bits of each channel in sRGB. This would cover 
> about 90% of the needs of programs to specify colors.

Given that we expect deeper (and floating point) frame buffers to be 
coming along soon, I'm not sure that promoting a limited resolution 
interface like this is a great idea.  People may also conflate the 
specified format in such an interface with the completely separate image 
formats which would be bad.

-keith






More information about the cairo mailing list