diff --git a/ANNOUNCE b/ANNOUNCE index eabb7f2de2ccecbf0474afc4bb2bc279d3c0279d..a29dd4807cd08666deac38b0dad40ae527f3c4c0 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -73,11 +73,13 @@ Version 1.6.18beta07 [June 3, 2015] Removed non-working progressive reader 'skip' function. This function has apparently never been used. It was implemented to support back-door modification of png_struct in libpng-1.4.x - but was apparently never tested (because it does nothing and cannot - do anything). + but (because it does nothing and cannot do anything) was apparently + never tested (John Bowler). Fixed cexcept.h in which GCC 5 now reports that one of the auto variables in the Try macro needs to be volatile to prevent value - being lost over the setjmp. + being lost over the setjmp (John Bowler). + Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler). + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 5fb4b24a7e5face5b1835c5ca2ff5f6a126e2faa..fecc756aaa04ff4f91d89c8ad4a271a3f8e188be 100644 --- a/CHANGES +++ b/CHANGES @@ -5258,11 +5258,12 @@ Version 1.6.18beta07 [June 3, 2015] Removed non-working progressive reader 'skip' function. This function has apparently never been used. It was implemented to support back-door modification of png_struct in libpng-1.4.x - but was apparently never tested (because it does nothing and cannot - do anything). + but (because it does nothing and cannot do anything) was apparently + never tested (John Bowler). Fixed cexcept.h in which GCC 5 now reports that one of the auto variables in the Try macro needs to be volatile to prevent value - being lost over the setjmp. + being lost over the setjmp (John Bowler). + Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngwrite.c b/pngwrite.c index ccdc47f65414198da265b43f43904218d03e9e8a..cfc5570df7d612d4ab32db2a4262343b73d917e0 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1032,6 +1032,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters) #endif /* WRITE_FILTER */ } +#ifdef PNG_WRITE_FILTER_SUPPORTED /* If we have allocated the row_buf, this means we have already started * with the image and we should have allocated all of the filter buffers * that have been selected. If prev_row isn't already allocated, then @@ -1101,20 +1102,14 @@ png_set_filter(png_structrp png_ptr, int method, int filters) } } png_ptr->do_filter = (png_byte)filters; +#endif } else png_error(png_ptr, "Unknown custom filter method"); } -/* This allows us to influence the way in which libpng chooses the "best" - * filter for the current scanline. While the "minimum-sum-of-absolute- - * differences metric is relatively fast and effective, there is some - * question as to whether it can be improved upon by trying to keep the - * filtered data going to zlib more consistent, hopefully resulting in - * better compression. - */ -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */ -/* Provide floating and fixed point APIs (DEPRECATED) */ +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +/* Provide floating and fixed point APIs */ #ifdef PNG_FLOATING_POINT_SUPPORTED void PNGAPI png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method, diff --git a/pngwutil.c b/pngwutil.c index 871075b9ef9c49218a26f7828ad813bd89e7d683..3bb6cf15c61c05e952e6fb63aae69e7008987e9b 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1962,7 +1962,7 @@ png_write_start_row(png_structrp png_ptr) int usr_pixel_depth; #ifdef PNG_WRITE_FILTER_SUPPORTED - int filters; + png_byte filters; #endif png_debug(1, "in png_write_start_row"); @@ -1983,10 +1983,10 @@ png_write_start_row(png_structrp png_ptr) filters = png_ptr->do_filter; if (png_ptr->height == 1) - filters &= ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH); + filters &= 0xff & ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH); if (png_ptr->width == 1) - filters &= ~(PNG_FILTER_SUB|PNG_FILTER_AVG|PNG_FILTER_PAETH); + filters &= 0xff & ~(PNG_FILTER_SUB|PNG_FILTER_AVG|PNG_FILTER_PAETH); if (filters == 0) filters = PNG_FILTER_NONE;