Revert "Remove second call to write_eXIf"

The second call to png_write_eXIf should not have been removed.

The first call to png_write_eXIf is for writing the eXIf chunk that is
positioned before IDAT, while the second call is for writing the eXIf
chunk that is positioned after IDAT.

TODO:
Implement a correct fix which consists in ensuring that there are no
eXIf chunks simultaneously before and after IDAT.

This reverts commit cd03aaf7bf0e0c748b8c6cb34a56b402b40d61d0.
This commit is contained in:
Cosmin Truta 2022-09-14 22:00:42 +03:00
parent abccfd7968
commit 3d57708c91

View File

@ -438,6 +438,11 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
} }
#endif #endif
#ifdef PNG_WRITE_eXIf_SUPPORTED
if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
#endif
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT); write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT);
#endif #endif