mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
committed by
Glenn Randers-Pehrson
parent
2312167d51
commit
5bc90389bf
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user