freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Gamma correction implementation


From: Simon Harvey
Subject: [Devel] Gamma correction implementation
Date: Thu, 7 Mar 2002 09:58:01 +0000 (GMT)

I've been looking at the experimental GRAYS_USE_GAMMA part of ftgrays.c
and I can't see how it solves the following problem:

If white text is being rendered on a black background and a pixel is
deemed to have 50% coverage, then the RGB value when gamma corrected might
need to be 192,192,192 to achieve 50% brightness. If the same pixel is
part of black text being rendered on a white background, it should also
have RGB=192,192,192. However, the scheme in ftgrays.c would correct the
*coverage* to 192, ultimately being rendered as 63,63,63 and exacerbating
the aliasing problem by making the glyph "ink heavy".

For black backgrounds the gamma correction works really well; for lighter
backgrounds it's worse (the "u" in "cruncher", "G"  in alphabet of
attached). I'm not sure the problem really lies with freetype;  shouldn't
gamma correction be performed only when the two colours involved are
known.

Any thoughts?
Simon

Attachment: gamma_font.png
Description: Binary data


reply via email to

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