[libpng16] Added color-map support to simplified API.

This is an initial version for review; the documentation has not yet been
updated.
This commit is contained in:
John Bowler
2012-01-23 22:43:22 -06:00
committed by Glenn Randers-Pehrson
parent 2312167d51
commit 5bc90389bf
8 changed files with 2239 additions and 458 deletions

View File

@@ -1454,7 +1454,7 @@ png_init_read_transformations(png_structrp png_ptr)
* NOTE: this discards the low 16 bits of the user supplied background
* color, but until expand_16 works properly there is no choice!
*/
# define CHOP(x) (x)=((png_uint_16)(((png_uint_32)(x)*255+32895) >> 16))
# define CHOP(x) (x)=((png_uint_16)PNG_DIV257(x))
CHOP(png_ptr->background.red);
CHOP(png_ptr->background.green);
CHOP(png_ptr->background.blue);