diff --git a/ANNOUNCE b/ANNOUNCE index 68d2c7d7..3de0a2ac 100644 --- a/ANNOUNCE +++ b/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 diff --git a/CHANGES b/CHANGES index 49a66534..6e942a30 100644 --- a/CHANGES +++ b/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 diff --git a/pngtest.c b/pngtest.c index cd75f87d..87c9cc37 100644 --- a/pngtest.c +++ b/pngtest.c @@ -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))))