[libng16] Added palette-index checking while writing.

Relocated palette-index checking function from pngrutil.c to pngtrans.c
This commit is contained in:
Glenn Randers-Pehrson
2012-03-02 22:10:15 -06:00
parent 8e92cd51c6
commit eeb1bb678d
10 changed files with 156 additions and 115 deletions

View File

@@ -748,8 +748,7 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
/* Report invalid palette index; added at libng-1.5.10 */
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
png_ptr->num_palette_max > png_ptr->num_palette)
png_warning(png_ptr, "palette index exceeded num_palette; "
"pixel(s) rendered opaque black");
png_warning(png_ptr, "Read palette index exceeding num_palette");
#endif
do