[cairo] Linear colorspace not a good idea

Bill Spitzak spitzak at d2.com
Mon Mar 13 15:48:35 PST 2006


I agree the antialiasing looks better when calculated in linear light.

The problem is that the same image, when inverted, does not look equal. 
In your examples compare the smallest letters in the white-on-black with 
the inverted images. The linear white ones look much thicker than the 
thin linear-black ones, while both the white and black sRGB ones look 
approximatly the same as each other, with a thickness somewhere between 
the two linear ones.

I am unsure exactly how bad of a problem this is. Certainly I have 
encountered lots of software that seems to rely on this. But conversely 
users have no trouble adjusting the thickness or color to make the 
letters and lines look the way they want. Also I would think the linear 
version would more accurately represent the output of a 
higher-resolution device, certainly laser-printed output exhibits 
exactly the same results as the linear one and users have accepted this 
for a long time.

Owen Taylor wrote:
> On Mon, 2006-03-13 at 14:13 -0800, Bill Spitzak wrote:
> 
>> Another serious problem is that sometimes people want the perceptual 
>> result of the composite rather than the true result. The most obvious 
>> example is text and thin lines, drawn in different colors on different 
>> backgrounds. People expect the same image drawn in different colors 
>> (such as white on black verses the inverse) will look the same thickness 
>> and weight. Unfortunately this is not true at all in linear space: the 
>> black lines look much thinner than white lines. But in sRGB it does 
>> appear to work, because it is much closer to perceptually linear. Every 
>> line graphics and work processor program in the world relies on this.
> 
> This is not true in my experience. White-on-black and black-on-white
> text look more balanced in weight with compositing done in linear
> color space.
> 
>  http://people.redhat.com/otaylor/fonts/gamma-screenshots/
> 
> Has some images, though they aren't really set up for side-by-side
> comparison. They aren't perfectly balanced with linear compositing
> either, which may indicate that there is a perceptual effect, but 
> it is weaker than the effect you get from compositing in sRGB space.
> 
> 						Owen
> 
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
> 


More information about the cairo mailing list