[libpng17] Merge pngvalid.c and pngfix.c with libpng-1.6.14beta04

This commit is contained in:
Glenn Randers-Pehrson
2014-09-28 10:37:26 -05:00
parent 776d1768aa
commit 4f8050416f
2 changed files with 21 additions and 9 deletions

View File

@@ -396,9 +396,9 @@ next_format(png_bytep colour_type, png_bytep bit_depth,
/* Palette images are restricted to 8 bit depth */
if (*bit_depth <= 8
# ifdef DO_16BIT
#ifdef DO_16BIT
|| (*colour_type != 3 && *bit_depth <= 16)
# endif
#endif
)
return 1;
@@ -3165,10 +3165,10 @@ init_standard_palette(png_store *ps, png_structp pp, png_infop pi, int npalette,
for (; i<256; ++i)
tRNS[i] = 24;
# ifdef PNG_WRITE_tRNS_SUPPORTED
#ifdef PNG_WRITE_tRNS_SUPPORTED
if (j > 0)
png_set_tRNS(pp, pi, tRNS, j, 0/*color*/);
# endif
#endif
}
}