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>
libpng16
Chris Blume 2024-01-31 07:13:13 -05:00 committed by Cosmin Truta
parent 59a68c83f0
commit 7f1f960d4f
2 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ Authors, for copyright and licensing purposes.
* Adam Richter
* Andreas Dilger
* Chris Blume
* Cosmin Truta
* Dave Martindale
* Eric S. Raymond

View File

@ -294,6 +294,14 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length);
}
#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)