[libpng17] Work in progress, merging with libpng-1.6.17rc01.

This commit is contained in:
Glenn Randers-Pehrson
2015-03-04 14:24:54 -06:00
parent 79a332afd0
commit c2f0c9683f
7 changed files with 79 additions and 76 deletions

View File

@@ -2052,7 +2052,7 @@ make_rgb_colormap(png_image_read_control *display)
/* Return a palette index to the above palette given three 8-bit sRGB values. */
#define PNG_RGB_INDEX(r,g,b) \
((png_byte)(6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b)))
((png_byte)(0xff & (6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b))))
static int
png_image_read_colormap(png_voidp argument)
@@ -3025,7 +3025,8 @@ png_image_read_and_map(png_voidp argument)
*outrow = gray;
else
*outrow = (png_byte)(PNG_CMAP_TRANS_BACKGROUND+1);
*outrow =
(png_byte)(0xff & (PNG_CMAP_TRANS_BACKGROUND+1));
}
break;