mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Allow fine grain control of unknown chunk APIs. This change allows
png_set_keep_unknown_chunks() to be turned off if not required and causes both read and write to behave appropriately (on read this is only possible if the user callback is used to handle unknown chunks). The change also removes the support for storing unknown chunks in the info_struct if the only unknown handling enabled is via the callback, allowing libpng to be configured with callback reading and none of the unnecessary code.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
025d415838
commit
4a6c6df6c7
@@ -2814,7 +2814,9 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
||||
* function.
|
||||
*/
|
||||
# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
|
||||
keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name);
|
||||
# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
||||
keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* One of the following methods will read the chunk or skip it (at least one
|
||||
|
||||
Reference in New Issue
Block a user