From 3e753f5cbea3a7b334ecd6dae3b0723f528e06a5 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 31 Jul 2017 16:56:30 -0500 Subject: [PATCH] [libpng16] Changed name of png_get_eXIF and png_set_eXIf() to png_get_eXIf_1() and png_set_eXIf_1(), respectively, to avoid breaking API compatibility with libpng-1.6.31. --- ANNOUNCE | 3 +++ CHANGES | 3 +++ libpng-manual.txt | 8 ++++---- libpng.3 | 18 +++++++++--------- png.h | 4 ++-- pngget.c | 2 +- pngrutil.c | 2 +- pngset.c | 3 +-- pngtest.c | 8 ++++---- 9 files changed, 28 insertions(+), 23 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index b0bf2ed16..4ff99e3cc 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -32,6 +32,9 @@ Version 1.6.32beta01 [July 31, 2017] to arguments for png_get_eXIf() and png_set_eXIf(). 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(). + Changed name of png_get_eXIF and png_set_eXIf() to png_get_eXIf_1() and + png_set_eXIf_1(), respectively, to avoid breaking API compatibility + with libpng-1.6.31. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index a8a98fe47..281899cb2 100644 --- a/CHANGES +++ b/CHANGES @@ -5915,6 +5915,9 @@ Version 1.6.32beta01 [July 31, 2017] to arguments for png_get_eXIf() and png_set_eXIf(). 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(). + Changed name of png_get_eXIF and png_set_eXIf() to png_get_eXIf_1() and + png_set_eXIf_1(), respectively, to avoid breaking API compatibility + with libpng-1.6.31. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/libpng-manual.txt b/libpng-manual.txt index 8f2189caf..74c67b0b7 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.32beta01 - July 27, 2017 + libpng version 1.6.32beta01 - July 31, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.32beta01 - July 27, 2017 + libpng versions 0.97, January 1998, through 1.6.32beta01 - July 31, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson @@ -1453,7 +1453,7 @@ png_set_rgb_to_gray()). the single transparent color for non-paletted images (PNG_INFO_tRNS) - png_get_eXIf(png_ptr, info_ptr, &exif); + png_get_eXIf_1(png_ptr, info_ptr, &exif, &num_exif); (PNG_INFO_eXIf) exif - Exif profile (array of png_byte) @@ -3103,7 +3103,7 @@ width, height, bit_depth, and color_type must be the same in each call. single transparent color for non-paletted images (PNG_INFO_tRNS) - png_set_eXIf(png_ptr, info_ptr, exif); + png_set_eXIf_1(png_ptr, info_ptr, exif, num_exif); hist - Exif profile (array of png_byte) (PNG_INFO_eXIf) diff --git a/libpng.3 b/libpng.3 index 7aacde37f..ecca52e19 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "July 27, 2017" +.TH LIBPNG 3 "July 31, 2017" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta01 .SH SYNOPSIS @@ -514,7 +514,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.32beta01 - July 27, 2017 + libpng version 1.6.32beta01 - July 31, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson @@ -525,7 +525,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.32beta01 - July 27, 2017 + libpng versions 0.97, January 1998, through 1.6.32beta01 - July 31, 2017 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson @@ -1967,7 +1967,7 @@ png_set_rgb_to_gray()). the single transparent color for non-paletted images (PNG_INFO_tRNS) - png_get_eXIf(png_ptr, info_ptr, &exif); + png_get_eXIf_1(png_ptr, info_ptr, &exif, &num_exif); (PNG_INFO_eXIf) exif - Exif profile (array of png_byte) @@ -3617,7 +3617,7 @@ width, height, bit_depth, and color_type must be the same in each call. single transparent color for non-paletted images (PNG_INFO_tRNS) - png_set_eXIf(png_ptr, info_ptr, exif); + png_set_eXIf_1(png_ptr, info_ptr, exif, num_exif); hist - Exif profile (array of png_byte) (PNG_INFO_eXIf) @@ -6020,7 +6020,7 @@ the first widely used release: ... 1.5.28 15 10528 15.so.15.28[.0] ... - 1.6.31 16 10631 16.so.16.31[.0] + 1.6.32 16 10632 16.so.16.32[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -6076,7 +6076,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.6.32beta01 - July 27, 2017: +Libpng version 1.6.32beta01 - July 31, 2017: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6101,7 +6101,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000 through 1.6.32beta01, July 27, 2017 are +libpng versions 1.0.7, July 1, 2000 through 1.6.32beta01, July 31, 2017 are Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals @@ -6229,7 +6229,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). Glenn Randers-Pehrson glennrp at users.sourceforge.net -July 27, 2017 +July 31, 2017 .\" end of man page diff --git a/png.h b/png.h index bd098e7a2..1c81e3ac8 100644 --- a/png.h +++ b/png.h @@ -2010,9 +2010,9 @@ PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, #endif #ifdef PNG_eXIf_SUPPORTED -PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, +PNG_EXPORT(246, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); -PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, +PNG_EXPORT(247, void, png_set_eXIf_1, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 num_exif, const png_bytep exif)); #endif diff --git a/pngget.c b/pngget.c index 177302406..28c235548 100644 --- a/pngget.c +++ b/pngget.c @@ -775,7 +775,7 @@ png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr, #ifdef PNG_eXIf_SUPPORTED png_uint_32 PNGAPI -png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, +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"); diff --git a/pngrutil.c b/pngrutil.c index 340275fc0..1b68988df 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -2041,7 +2041,7 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) if (png_crc_finish(png_ptr, 0) != 0) return; - png_set_eXIf(png_ptr, info_ptr, length, eXIf_buf); + png_set_eXIf_1(png_ptr, info_ptr, length, eXIf_buf); png_free(png_ptr, eXIf_buf); } diff --git a/pngset.c b/pngset.c index a6a22067d..5e0917a85 100644 --- a/pngset.c +++ b/pngset.c @@ -136,7 +136,7 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X, #ifdef PNG_eXIf_SUPPORTED void PNGAPI -png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, +png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep eXIf_buf) { int i; @@ -156,7 +156,6 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, if (info_ptr->exif == NULL) { png_warning(png_ptr, "Insufficient memory for eXIf chunk data"); - return; } diff --git a/pngtest.c b/pngtest.c index 0b091fa51..b84e585e5 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1197,11 +1197,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_bytep exif; png_uint_32 exif_length; - if (png_get_eXIf(read_ptr, read_info_ptr, &exif_length, &exif) != 0) + if (png_get_eXIf_1(read_ptr, read_info_ptr, &exif_length, &exif) != 0) { printf(" eXIf type %c%c, %d bytes\n",exif[0],exif[1], (int)exif_length); - png_set_eXIf(write_ptr, write_info_ptr, exif_length, exif); + png_set_eXIf_1(write_ptr, write_info_ptr, exif_length, exif); } } #endif @@ -1552,11 +1552,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) png_bytep exif; png_uint_32 exif_length; - if (png_get_eXIf(read_ptr, end_info_ptr, &exif_length, &exif) != 0) + if (png_get_eXIf_1(read_ptr, end_info_ptr, &exif_length, &exif) != 0) { printf(" eXIf type %c%c, %d bytes\n",exif[0],exif[1], (int)exif_length); - png_set_eXIf(write_ptr, write_end_info_ptr, exif_length, exif); + png_set_eXIf_1(write_ptr, write_end_info_ptr, exif_length, exif); } } #endif