mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Reverted the fix of byte order in png_do_read_filler() with 16-bit
input that was made in version 1.6.17beta01, to preserve legacy behavior even though it was incorrect. Instead, added new API png_set_filter_16() and png_set_add_alpha_16() that set a flag to make png_do_read_filter() interpret the filler bytes properly.
This commit is contained in:
@@ -1396,11 +1396,11 @@ png_write_png(png_structrp png_ptr, png_inforp info_ptr,
|
||||
"PNG_TRANSFORM_STRIP_FILLER: BEFORE+AFTER not supported");
|
||||
|
||||
/* Continue if ignored - this is the pre-1.6.10 behavior */
|
||||
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
|
||||
png_set_filler_16(png_ptr, 0, PNG_FILLER_AFTER);
|
||||
}
|
||||
|
||||
else if ((transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) != 0)
|
||||
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
|
||||
png_set_filler_16(png_ptr, 0, PNG_FILLER_BEFORE);
|
||||
#else
|
||||
png_app_error(png_ptr, "PNG_TRANSFORM_STRIP_FILLER not supported");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user