diff options
author | John Bowler <jbowler@acm.org> | 2012-08-15 22:53:00 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2012-08-15 22:53:00 -0500 |
commit | e9567514dd42a4a756def1f21d3b52ea83966777 (patch) | |
tree | 3483dc7bbcccef34253fae94a0b6439988d4e591 /pngstruct.h | |
parent | b593b3f0353fa039fc73347d1e63210538034a88 (diff) | |
download | libpng-e9567514dd42a4a756def1f21d3b52ea83966777.tar.gz |
[libpng16] Unknown handling fixes and clean up. This adds more correct option
control of the unknown handling, corrects the pre-existing bug where
the per-chunk 'keep' setting is ignored and makes it possible to skip
IDAT chunks in the sequential reader (broken in earlier 1.6 versions).
There is a new test program, test-unknown.c, which is a work in progress
(not currently part of the test suite). Comments in the header files now
explain how the unknown handling works.
Diffstat (limited to 'pngstruct.h')
-rw-r--r-- | pngstruct.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pngstruct.h b/pngstruct.h index d1bcf322f..a3f8383fa 100644 --- a/pngstruct.h +++ b/pngstruct.h @@ -368,12 +368,16 @@ struct png_struct_def #ifdef PNG_USER_CHUNKS_SUPPORTED png_voidp user_chunk_ptr; +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ #endif +#endif -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - unsigned int num_chunk_list; - png_bytep chunk_list; +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + int unknown_default; /* As PNG_HANDLE_* */ + unsigned int num_chunk_list; /* Number of entries in the list */ + png_bytep chunk_list; /* List of png_byte[5]; the textual chunk name + * followed by a PNG_HANDLE_* byte */ #endif /* New members added in libpng-1.0.3 */ @@ -438,14 +442,12 @@ struct png_struct_def #endif /* New member added in libpng-1.0.25 and 1.2.17 */ -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED /* Temporary storage for unknown chunk that the library doesn't recognize, * used while reading the chunk. */ -#ifdef PNG_READ_SUPPORTED png_unknown_chunk unknown_chunk; #endif -#endif /* New member added in libpng-1.2.26 */ png_size_t old_big_row_buf_size; |