|
From: Maxim S. <mcs...@ya...> - 2004-06-18 03:25:50
|
I played a bit more with it and this gamma-correction works terrific. Congratulations, Stephan! http://www.antigrain.com/stuff/new_gamma.png It finally solved that nasty problem with the dependency of the gamma correction on "dark-on-light" or "light-on-dark". The existing gamma in AGG works well if you draw black lines on white background (set it to about 1.6). But when drawing white on black, you had to set gamma of about 0.7. If you have both, there was no proper gamma except for just 1.0. Now it works perfect in all cases. But, it will slow down rendering a bit, because it requires two LUTs and 9 extra addressing operations. I don't think there will be great impact, tho. You can play with the attached example. But don't rely on the pixfmt_rgb24_gamma class, because there only blend_solid_hspan is implemented. McSeem |