[master] Restore new pngtest.c
This commit is contained in:
parent
e5e60564cf
commit
2522de8594
4
ANNOUNCE
4
ANNOUNCE
@ -137,10 +137,10 @@ version 1.2.41beta15 [November 8, 2009]
|
||||
functions while building libpng. They need to be tested, especially
|
||||
those using compilers other than gcc.
|
||||
Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
|
||||
Removed three direct references to read_info_ptr members in pngtest.c
|
||||
that were detected by the new PNG_DEPSTRUCT macro.
|
||||
|
||||
version 1.2.41beta16 [November 9, 2009]
|
||||
Removed three direct references to read_info_ptr members in pngtest.c
|
||||
that were detected by the new PNG_DEPSTRUCT macro.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
|
||||
|
13
CHANGES
13
CHANGES
@ -2568,20 +2568,11 @@ version 1.2.41beta15 [November 8, 2009]
|
||||
functions while building libpng. They need to be tested, especially
|
||||
those using compilers other than gcc.
|
||||
Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
|
||||
|
||||
version 1.2.41beta16 [November 9, 2009]
|
||||
Removed three direct references to read_info_ptr members in pngtest.c
|
||||
that were detected by the new PNG_DEPSTRUCT macro.
|
||||
|
||||
version 1.2.41beta16 [November 9, 2009]
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe)
|
||||
or to glennrp at users.sourceforge.net
|
||||
|
||||
Glenn R-P
|
||||
*/
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
@ -1112,11 +1112,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
if (png_get_tRNS(read_ptr, read_info_ptr, &trans, &num_trans,
|
||||
&trans_values))
|
||||
{
|
||||
int sample_max = (1 << read_info_ptr->bit_depth);
|
||||
int sample_max = (1 << bit_depth);
|
||||
/* libpng doesn't reject a tRNS chunk with out-of-range samples */
|
||||
if (!((read_info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
|
||||
if (!((color_type == PNG_COLOR_TYPE_GRAY &&
|
||||
(int)trans_values->gray > sample_max) ||
|
||||
(read_info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
|
||||
(color_type == PNG_COLOR_TYPE_RGB &&
|
||||
((int)trans_values->red > sample_max ||
|
||||
(int)trans_values->green > sample_max ||
|
||||
(int)trans_values->blue > sample_max))))
|
||||
|
Loading…
Reference in New Issue
Block a user