[libpng16] Fixed NO_WRITE_FILTER and -Wconversion build breaks (John Bowler).
This commit is contained in:
parent
b780eba4e4
commit
2dfcf65981
8
ANNOUNCE
8
ANNOUNCE
@ -73,11 +73,13 @@ Version 1.6.18beta07 [June 3, 2015]
|
|||||||
Removed non-working progressive reader 'skip' function. This
|
Removed non-working progressive reader 'skip' function. This
|
||||||
function has apparently never been used. It was implemented
|
function has apparently never been used. It was implemented
|
||||||
to support back-door modification of png_struct in libpng-1.4.x
|
to support back-door modification of png_struct in libpng-1.4.x
|
||||||
but was apparently never tested (because it does nothing and cannot
|
but (because it does nothing and cannot do anything) was apparently
|
||||||
do anything).
|
never tested (John Bowler).
|
||||||
Fixed cexcept.h in which GCC 5 now reports that one of the auto
|
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
|
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
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
7
CHANGES
7
CHANGES
@ -5258,11 +5258,12 @@ Version 1.6.18beta07 [June 3, 2015]
|
|||||||
Removed non-working progressive reader 'skip' function. This
|
Removed non-working progressive reader 'skip' function. This
|
||||||
function has apparently never been used. It was implemented
|
function has apparently never been used. It was implemented
|
||||||
to support back-door modification of png_struct in libpng-1.4.x
|
to support back-door modification of png_struct in libpng-1.4.x
|
||||||
but was apparently never tested (because it does nothing and cannot
|
but (because it does nothing and cannot do anything) was apparently
|
||||||
do anything).
|
never tested (John Bowler).
|
||||||
Fixed cexcept.h in which GCC 5 now reports that one of the auto
|
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
|
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
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
13
pngwrite.c
13
pngwrite.c
@ -1032,6 +1032,7 @@ png_set_filter(png_structrp png_ptr, int method, int filters)
|
|||||||
#endif /* WRITE_FILTER */
|
#endif /* WRITE_FILTER */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||||
/* If we have allocated the row_buf, this means we have already started
|
/* 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
|
* 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
|
* 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;
|
png_ptr->do_filter = (png_byte)filters;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
png_error(png_ptr, "Unknown custom filter method");
|
png_error(png_ptr, "Unknown custom filter method");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This allows us to influence the way in which libpng chooses the "best"
|
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */
|
||||||
* filter for the current scanline. While the "minimum-sum-of-absolute-
|
/* Provide floating and fixed point APIs */
|
||||||
* 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_FLOATING_POINT_SUPPORTED
|
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||||
void PNGAPI
|
void PNGAPI
|
||||||
png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method,
|
png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method,
|
||||||
|
@ -1962,7 +1962,7 @@ png_write_start_row(png_structrp png_ptr)
|
|||||||
int usr_pixel_depth;
|
int usr_pixel_depth;
|
||||||
|
|
||||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||||
int filters;
|
png_byte filters;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
png_debug(1, "in png_write_start_row");
|
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;
|
filters = png_ptr->do_filter;
|
||||||
|
|
||||||
if (png_ptr->height == 1)
|
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)
|
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)
|
if (filters == 0)
|
||||||
filters = PNG_FILTER_NONE;
|
filters = PNG_FILTER_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user