[devel] Implementation of premultiplied alpha support: png_set_alpha_mode

(libpng-manual.txt still to be updated, see png.h for documentation.)
This commit is contained in:
John Bowler
2011-05-07 21:00:28 -05:00
committed by Glenn Randers-Pehrson
parent af855e415d
commit d273ad2d0f
12 changed files with 2128 additions and 607 deletions

View File

@@ -1472,6 +1472,11 @@ on gamma in the PNG specification for an excellent description of what
gamma is, and why all applications should support it. It is strongly
recommended that PNG viewers support gamma correction.
This API unconditionally sets the screen and file gamma values, so it will
override the value in the PNG file unless it is called before the PNG file
reading starts. For this reason you must always call it with the PNG file
value when you call it in this position:
if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
png_set_gamma(png_ptr, screen_gamma, file_gamma);