freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] gamma correction and FreeType


From: Dave Arnold
Subject: Re: [ft-devel] gamma correction and FreeType
Date: Fri, 08 Nov 2013 13:32:49 -0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Hi Søren,

My intuition is that it should always be an light/photon flux integration 
problem, in linear space. That is, #1 is always correct. If #2 were correct, 
then the color would change as you walked toward or away from a display of the 
test pattern. Have you ever seen this effect in the real world?

-Dave

On 11/7/2013 10:53 PM, Antti Lankila wrote:
Søren Sandmann <address@hidden> kirjoitti 8.11.2013 kello 3.33:

Søren Sandmann <address@hidden> writes:

Suppose you have a checkerboard pattern where the squares are 25% and
75% luminance (ie., measured in linear light) respectively. Then
consider two extremes:

1. The squares are so tiny that they are impossible to distinguish. In
   this case the pattern will look like a solid 50% luminance, which
   corresponds to 186 in sRGB.

2. The squares are so big that you can easily see them. In this case, if
   you had to choose one color to represent the whole pattern, you
   should pick the one that minimizes the overall perceptual error, for
   example by converting to sRGB, which is roughly perceptually uniform,
   and taking the average, producing an sRGB color of 118.
Looks like I botched the math here. In case 2, the resulting sRGB color
would be 179, so there is not that much difference for these values.

The point remains though. Using using 0% and 100%, the difference is
bigger: 186 in case 1, and 128 in case 2.
This is an interesting argument, but even if correct, I’m not sure what 
practical algorithm it would lend to. For instance, am I correct in 
interpreting that for antialiasing, you are suggesting that we should use gamma 
2.2 for small fonts, and gamma 1.0 for large fonts? In every case, I think the 
theory is ”wrong” in sense that diagonal lines become the more jagged the more 
used gamma value deviates from 2.2, and this will be the case regardless of 
what the edge dimensions are.

—
Antti.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]