summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2022-09-14 22:00:42 +0300
committerCosmin Truta <ctruta@gmail.com>2022-09-14 22:00:42 +0300
commit3d57708c9166419b7f5e0bbda2f7a2149112c844 (patch)
treece28a919788546b285e289d347fe672a90d73274
parentabccfd796870f42d8815bb30bf30920bb1c97105 (diff)
downloadlibpng-3d57708c9166419b7f5e0bbda2f7a2149112c844.tar.gz
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.
-rw-r--r--pngwrite.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pngwrite.c b/pngwrite.c
index abbca558f..06c45d16a 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -438,6 +438,11 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
}
#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
write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT);
#endif