mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Merge pngvalid.c and pngfix.c with libpng-1.6.14beta04
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user