diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-07-31 14:20:40 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-07-31 14:21:46 -0500 |
commit | 40afb685704f1a5bf8d9edc0b5c7ec7f25e94b77 (patch) | |
tree | fd230ed1d47cdb8bde8055284494bda7f8256484 /pngwrite.c | |
parent | 4ab78af90a0f54665a8c1aca16745d2f641c7efb (diff) |
[libpng16] Added calls to png_handle_eXIf(() in pngread.c and png_write_eXIf()
in pngwrite.c, and made various other fixes to png_write_eXIf().
Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif
to arguments for png_get_eXIf() and png_set_eXIf().
Diffstat (limited to 'pngwrite.c')
-rw-r--r-- | pngwrite.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pngwrite.c b/pngwrite.c index 70d47c4ca..100abc2ab 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -237,6 +237,11 @@ png_write_info(png_structrp png_ptr, png_const_inforp info_ptr) png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); #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_hIST_SUPPORTED if ((info_ptr->valid & PNG_INFO_hIST) != 0) png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); @@ -432,6 +437,12 @@ 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 |