diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-08-03 10:29:10 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-08-03 10:29:10 -0500 |
commit | d930d36155fe79b277c11d868572769cb4ffb586 (patch) | |
tree | decf2c34330688b8956b9a90a42b0572773e8595 /pngget.c | |
parent | a1fe2c98489519d415b72bc0026f0c86d82278b7 (diff) | |
download | libpng-d930d36155fe79b277c11d868572769cb4ffb586.tar.gz |
[libpng16] Restored png_get_eXIf_1() and png_set_eXIf_1() because strlen(eXIf_buf)
does not work (the eXIf chunk data can contain zeroes).
Diffstat (limited to 'pngget.c')
-rw-r--r-- | pngget.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -778,11 +778,22 @@ png_uint_32 PNGAPI png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, png_bytep *exif) { + png_warning(png_ptr, "png_get_eXIf does not work; use png_get_eXIf_1"); + PNG_UNUSED(info_ptr) + PNG_UNUSED(exif) + return 0; +} + +png_uint_32 PNGAPI +png_get_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 *num_exif, png_bytep *exif) +{ png_debug1(1, "in %s retrieval function", "eXIf"); if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL) { + *num_exif = info_ptr->num_exif; *exif = info_ptr->exif; return (PNG_INFO_eXIf); } |