diff options
author | Chris Blume <ProgramMax@gmail.com> | 2024-01-31 07:13:13 -0500 |
---|---|---|
committer | Cosmin Truta <ctruta@gmail.com> | 2024-02-01 20:49:15 +0200 |
commit | 7f1f960d4ffdb47ddb964b7d7753701b402f5214 (patch) | |
tree | 8d993993f39fa0653defec0a7f30cfbc861e98b9 | |
parent | 59a68c83f0ead9bac34afecba6989b71fb4902bd (diff) | |
download | libpng-7f1f960d4ffdb47ddb964b7d7753701b402f5214.tar.gz |
Add eXIf support to push mode
libpng already supports eXIf as of v1.6.31.
However, it seems like support was added for normal mode and not added
to push mode.
Notice PNG_READ_eXIfJSUPPORTED is in pngread.c:
https://github.com/pnggroup/libpng/blob/libpng16/pngread.c#L178
but is missing from pngpread.c:
https://github.com/pnggroup/libpng/blob/libpng16/pngpread.c#L274
This commit adds eXIf support to push mode.
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | pngpread.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -6,6 +6,7 @@ Authors, for copyright and licensing purposes. * Adam Richter * Andreas Dilger + * Chris Blume * Cosmin Truta * Dave Martindale * Eric S. Raymond diff --git a/pngpread.c b/pngpread.c index be640f77a..ffab19c08 100644 --- a/pngpread.c +++ b/pngpread.c @@ -295,6 +295,14 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) } #endif +#ifdef PNG_READ_eXIf_SUPPORTED + else if (png_ptr->chunk_name == png_eXIf) + { + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_eXIf(png_ptr, info_ptr, png_ptr->push_length); + } + +#endif #ifdef PNG_READ_sRGB_SUPPORTED else if (chunk_name == png_sRGB) { |