提交 3fa1df48 编写于 作者: G Glenn Randers-Pehrson

[libpng16] Removed png_get_eXIf_1() and png_set_eXIf_1().

上级 f30f1ae3
Libpng 1.6.32beta05 - August 2, 2017 Libpng 1.6.32beta06 - August 2, 2017
This is not intended to be a public release. It will be replaced This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version. within a few weeks by a public version or by another test version.
...@@ -8,20 +8,20 @@ Files available for download: ...@@ -8,20 +8,20 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a Source files with LF line endings (for Unix/Linux) and with a
"configure" script "configure" script
1.6.32beta05.tar.xz (LZMA-compressed, recommended) 1.6.32beta06.tar.xz (LZMA-compressed, recommended)
1.6.32beta05.tar.gz 1.6.32beta06.tar.gz
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lp1632b05.7z (LZMA-compressed, recommended) lp1632b06.7z (LZMA-compressed, recommended)
lp1632b05.zip lp1632b06.zip
Other information: Other information:
1.6.32beta05-README.txt 1.6.32beta06-README.txt
1.6.32beta05-LICENSE.txt 1.6.32beta06-LICENSE.txt
libpng-1.6.32beta05-*.asc (armored detached GPG signatures) libpng-1.6.32beta06-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.31): Changes since the last public release (1.6.31):
...@@ -51,6 +51,9 @@ Version 1.6.32beta04 [August 2, 2017] ...@@ -51,6 +51,9 @@ Version 1.6.32beta04 [August 2, 2017]
Version 1.6.32beta05 [August 2, 2017] Version 1.6.32beta05 [August 2, 2017]
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability. Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability.
Version 1.6.32beta06 [August 2, 2017]
Removed png_get_eXIf_1() and png_set_eXIf_1().
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement
......
...@@ -5934,6 +5934,9 @@ Version 1.6.32beta04 [August 2, 2017] ...@@ -5934,6 +5934,9 @@ Version 1.6.32beta04 [August 2, 2017]
Version 1.6.32beta05 [August 2, 2017] Version 1.6.32beta05 [August 2, 2017]
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability. Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability.
Version 1.6.32beta06 [August 2, 2017]
Removed png_get_eXIf_1() and png_set_eXIf_1().
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement
......
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.32beta05 - August 2, 2017 libpng version 1.6.32beta06 - August 2, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2017 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 ...@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.6.32beta05 - August 2, 2017 libpng versions 0.97, January 1998, through 1.6.32beta06 - August 2, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2017 Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson
...@@ -1454,8 +1454,6 @@ png_set_rgb_to_gray()). ...@@ -1454,8 +1454,6 @@ png_set_rgb_to_gray()).
non-paletted images (PNG_INFO_tRNS) non-paletted images (PNG_INFO_tRNS)
png_get_eXIf(png_ptr, info_ptr, &exif); png_get_eXIf(png_ptr, info_ptr, &exif);
png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif);
(PNG_INFO_eXIf) (PNG_INFO_eXIf)
exif - Exif profile (array of png_byte) exif - Exif profile (array of png_byte)
...@@ -3107,8 +3105,6 @@ width, height, bit_depth, and color_type must be the same in each call. ...@@ -3107,8 +3105,6 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_eXIf(png_ptr, info_ptr, exif); png_set_eXIf(png_ptr, info_ptr, exif);
png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif);
exif - Exif profile (array of exif - Exif profile (array of
png_byte) (PNG_INFO_eXIf) png_byte) (PNG_INFO_eXIf)
...@@ -5408,7 +5404,7 @@ Since the PNG Development group is an ad-hoc body, we can't make ...@@ -5408,7 +5404,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.32beta05 are Y2K compliant. It is my belief that earlier upward through 1.6.32beta06 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer Libpng only has two year fields. One is a 2-byte unsigned integer
......
.TH LIBPNG 3 "August 2, 2017" .TH LIBPNG 3 "August 2, 2017"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta05 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta06
.SH SYNOPSIS .SH SYNOPSIS
\fB \fB
#include <png.h>\fP #include <png.h>\fP
...@@ -99,8 +99,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta05 ...@@ -99,8 +99,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta05
\fBpng_uint_32 png_get_eXIf (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fI*exif\fP\fB);\fP \fBpng_uint_32 png_get_eXIf (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fI*exif\fP\fB);\fP
\fBpng_uint_32 png_get_eXIf_1 (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fInum_exif\fP\fB, png_bytep \fI*exif\fP\fB);\fP
\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP \fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP \fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
...@@ -353,8 +351,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta05 ...@@ -353,8 +351,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta05
\fBvoid png_set_eXIf (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fIexif\fP\fB);\fP \fBvoid png_set_eXIf (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fIexif\fP\fB);\fP
\fBvoid png_set_eXIf_1 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fInum_exif\fP\fB, png_bytep \fIexif\fP\fB);\fP
\fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP \fBvoid png_set_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fIhist\fP\fB);\fP
\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP \fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
...@@ -518,7 +514,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. ...@@ -518,7 +514,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT .SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.32beta05 - August 2, 2017 libpng version 1.6.32beta06 - August 2, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2017 Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson
...@@ -529,7 +525,7 @@ libpng-manual.txt - A description on how to use and modify libpng ...@@ -529,7 +525,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.6.32beta05 - August 2, 2017 libpng versions 0.97, January 1998, through 1.6.32beta06 - August 2, 2017
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2017 Glenn Randers-Pehrson Copyright (c) 1998-2017 Glenn Randers-Pehrson
...@@ -1972,8 +1968,6 @@ png_set_rgb_to_gray()). ...@@ -1972,8 +1968,6 @@ png_set_rgb_to_gray()).
non-paletted images (PNG_INFO_tRNS) non-paletted images (PNG_INFO_tRNS)
png_get_eXIf(png_ptr, info_ptr, &exif); png_get_eXIf(png_ptr, info_ptr, &exif);
png_get_eXIf_1(png_ptr, info_ptr, &num_exif, &exif);
(PNG_INFO_eXIf) (PNG_INFO_eXIf)
exif - Exif profile (array of png_byte) exif - Exif profile (array of png_byte)
...@@ -3625,8 +3619,6 @@ width, height, bit_depth, and color_type must be the same in each call. ...@@ -3625,8 +3619,6 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_eXIf(png_ptr, info_ptr, exif); png_set_eXIf(png_ptr, info_ptr, exif);
png_set_eXIf_1(png_ptr, info_ptr, num_exif, exif);
exif - Exif profile (array of exif - Exif profile (array of
png_byte) (PNG_INFO_eXIf) png_byte) (PNG_INFO_eXIf)
...@@ -5926,7 +5918,7 @@ Since the PNG Development group is an ad-hoc body, we can't make ...@@ -5926,7 +5918,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.32beta05 are Y2K compliant. It is my belief that earlier upward through 1.6.32beta06 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer Libpng only has two year fields. One is a 2-byte unsigned integer
...@@ -6084,7 +6076,7 @@ possible without all of you. ...@@ -6084,7 +6076,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation. Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.32beta05 - August 2, 2017: Libpng version 1.6.32beta06 - August 2, 2017:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
...@@ -6109,7 +6101,7 @@ this sentence. ...@@ -6109,7 +6101,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.32beta05, August 2, 2017 are libpng versions 1.0.7, July 1, 2000 through 1.6.32beta06, August 2, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, 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 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 disclaimer and license as libpng-1.0.6 with the following individuals
......
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.6.32beta05, August 2, 2017 * libpng version 1.6.32beta06, August 2, 2017
* *
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.32beta05, August 2, 2017: * libpng versions 0.97, January 1998, through 1.6.32beta06, August 2, 2017:
* Glenn Randers-Pehrson. * Glenn Randers-Pehrson.
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
*/ */
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.0.7, July 1, 2000 through 1.6.32beta05, August 2, 2017 are * libpng versions 1.0.7, July 1, 2000 through 1.6.32beta06, August 2, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, 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 * 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 * disclaimer and license as libpng-1.0.6 with the following individuals
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
* an official declaration. * an official declaration.
* *
* This is your unofficial assurance that libpng from version 0.71 and * This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.32beta05 are Y2K compliant. It is my belief that * upward through 1.6.32beta06 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant. * earlier versions were also Y2K compliant.
* *
* Libpng only has two year fields. One is a 2-byte unsigned integer * Libpng only has two year fields. One is a 2-byte unsigned integer
...@@ -309,8 +309,8 @@ ...@@ -309,8 +309,8 @@
*/ */
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.32beta05" #define PNG_LIBPNG_VER_STRING "1.6.32beta06"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.32beta05 - August 2, 2017\n" #define PNG_HEADER_VERSION_STRING " libpng version 1.6.32beta06 - August 2, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16 #define PNG_LIBPNG_VER_DLLNUM 16
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
* PNG_LIBPNG_VER_STRING, omitting any leading zero: * PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/ */
#define PNG_LIBPNG_VER_BUILD 05 #define PNG_LIBPNG_VER_BUILD 06
/* Release Status */ /* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1 #define PNG_LIBPNG_BUILD_ALPHA 1
...@@ -459,7 +459,7 @@ extern "C" { ...@@ -459,7 +459,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h /* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number. * do not agree upon the version number.
*/ */
typedef char* png_libpng_version_1_6_32beta05; typedef char* png_libpng_version_1_6_32beta06;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
* *
...@@ -2014,10 +2014,6 @@ PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, ...@@ -2014,10 +2014,6 @@ PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, png_bytep *exif)); png_inforp info_ptr, png_bytep *exif));
PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, const png_bytep exif)); png_inforp info_ptr, const png_bytep exif));
PNG_EXPORT(248, 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(249, void, png_set_eXIf_1, (png_const_structrp png_ptr,
png_inforp info_ptr, png_uint_32 num_exif, const png_bytep exif));
#endif #endif
#ifdef PNG_gAMA_SUPPORTED #ifdef PNG_gAMA_SUPPORTED
...@@ -3263,7 +3259,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, ...@@ -3263,7 +3259,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
* one to use is one more than this.) * one to use is one more than this.)
*/ */
#ifdef PNG_EXPORT_LAST_ORDINAL #ifdef PNG_EXPORT_LAST_ORDINAL
PNG_EXPORT_LAST_ORDINAL(249); PNG_EXPORT_LAST_ORDINAL(247);
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -777,21 +777,12 @@ png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr, ...@@ -777,21 +777,12 @@ png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr,
png_uint_32 PNGAPI png_uint_32 PNGAPI
png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
png_bytep *exif) png_bytep *exif)
{
png_uint_32 num_exif = (png_uint_32) strlen((char *) exif);
return (png_get_eXIf_1(png_ptr, info_ptr, &num_exif, exif));
}
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"); png_debug1(1, "in %s retrieval function", "eXIf");
if (png_ptr != NULL && info_ptr != NULL && if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL) (info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL)
{ {
*num_exif = info_ptr->num_exif;
*exif = info_ptr->exif; *exif = info_ptr->exif;
return (PNG_INFO_eXIf); return (PNG_INFO_eXIf);
} }
......
...@@ -2048,7 +2048,7 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) ...@@ -2048,7 +2048,7 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if (png_crc_finish(png_ptr, 0) != 0) if (png_crc_finish(png_ptr, 0) != 0)
return; return;
png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf); png_set_eXIf(png_ptr, info_ptr, info_ptr->eXIf_buf);
png_free(png_ptr, info_ptr->eXIf_buf); png_free(png_ptr, info_ptr->eXIf_buf);
info_ptr->eXIf_buf = NULL; info_ptr->eXIf_buf = NULL;
......
...@@ -138,14 +138,6 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X, ...@@ -138,14 +138,6 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
void PNGAPI void PNGAPI
png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
const png_bytep eXIf_buf) const png_bytep eXIf_buf)
{
png_set_eXIf_1(png_ptr, info_ptr, (png_uint_32)strlen((char *)eXIf_buf),
(const png_bytep) eXIf_buf);
}
void PNGAPI
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; int i;
...@@ -160,7 +152,7 @@ png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, ...@@ -160,7 +152,7 @@ png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr,
info_ptr->exif = NULL; info_ptr->exif = NULL;
} }
info_ptr->num_exif = num_exif; info_ptr->num_exif = (png_uint_32)strlen((const char *)eXIf_buf);
info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr, info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr,
info_ptr->num_exif)); info_ptr->num_exif));
...@@ -173,7 +165,7 @@ png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, ...@@ -173,7 +165,7 @@ png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr,
info_ptr->free_me |= PNG_FREE_EXIF; info_ptr->free_me |= PNG_FREE_EXIF;
for (i = 0; i < (int) num_exif; i++) for (i = 0; i < (int) info_ptr->num_exif; i++)
info_ptr->exif[i] = eXIf_buf[i]; info_ptr->exif[i] = eXIf_buf[i];
info_ptr->valid |= PNG_INFO_eXIf; info_ptr->valid |= PNG_INFO_eXIf;
......
...@@ -1562,13 +1562,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) ...@@ -1562,13 +1562,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_bytep exif=NULL; png_bytep exif=NULL;
png_uint_32 exif_length; png_uint_32 exif_length;
if (png_get_eXIf_1(read_ptr, end_info_ptr, &exif_length, &exif) != 0) if (png_get_eXIf(read_ptr, end_info_ptr, &exif) != 0)
{ {
exif_length=(png_uint_32)strlen((const char *)exif);
if (exif_length > 1) if (exif_length > 1)
printf(" eXIf type %c%c, %d bytes\n",exif[0],exif[1], printf(" eXIf type %c%c, %d bytes\n",exif[0],exif[1],
(int)exif_length); (int)exif_length);
# ifdef PNG_WRITE_eXIf_SUPPORTED # ifdef PNG_WRITE_eXIf_SUPPORTED
png_set_eXIf_1(write_ptr, write_end_info_ptr, exif_length, exif); png_set_eXIf(write_ptr, write_end_info_ptr, exif);
# endif # endif
} }
} }
...@@ -2131,4 +2132,4 @@ main(void) ...@@ -2131,4 +2132,4 @@ main(void)
#endif #endif
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_32beta05 Your_png_h_is_not_version_1_6_32beta05; typedef png_libpng_version_1_6_32beta06 Your_png_h_is_not_version_1_6_32beta06;
;Version 1.6.32beta05 ;Version 1.6.32beta06
;-------------------------------------------------------------- ;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file ; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng ; Contains all the symbols that can be exported from libpng
...@@ -252,5 +252,3 @@ EXPORTS ...@@ -252,5 +252,3 @@ EXPORTS
png_image_write_to_memory @245 png_image_write_to_memory @245
png_get_eXIf @246 png_get_eXIf @246
png_set_eXIf @247 png_set_eXIf @247
png_get_eXIf_1 @248
png_set_eXIf_1 @249
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册