Compare commits

..

8 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
619cf868e6 [libpng16] Imported from libpng-1.6.32beta01.tar 2017-07-31 17:07:23 -05:00
Glenn Randers-Pehrson
3524b0d201 [libpng16] Update "Last changed" dates and some copyright years 2017-07-31 17:03:17 -05:00
Glenn Randers-Pehrson
3e753f5cbe [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.
2017-07-31 16:56:30 -05:00
Glenn Randers-Pehrson
c77274ffa9 [libpng16] Committed png.h and pngpriv.h that were omitted from previous checkin 2017-07-31 16:43:19 -05:00
Glenn Randers-Pehrson
323c8655cf [libpng16] Updated pngread.c with calls to png_handle_eXIf() omitted from previous checkin 2017-07-31 15:23:06 -05:00
Glenn Randers-Pehrson
40afb68570 [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().
2017-07-31 14:21:46 -05:00
Glenn Randers-Pehrson
4ab78af90a [libpng16] Avoid possible NULL dereference in png_handle_eXIf when benign_errors
are allowed. Avoid leaking the input buffer "eXIf_buf".
2017-07-30 19:36:25 -05:00
Glenn Randers-Pehrson
b73c891891 [libpng16] Bump version to 1.6.32beta01 2017-07-27 14:18:21 -05:00
39 changed files with 172 additions and 149 deletions

View File

@@ -1,57 +1,40 @@
Libpng 1.6.31 - July 27, 2017
Libpng 1.6.32beta01 - July 31, 2017
This is a public release of libpng, intended for use in production codes.
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.
Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.6.31.tar.xz (LZMA-compressed, recommended)
libpng-1.6.31.tar.gz
1.6.32beta01.tar.xz (LZMA-compressed, recommended)
1.6.32beta01.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
lpng1631.7z (LZMA-compressed, recommended)
lpng1631.zip
lp1632b01.7z (LZMA-compressed, recommended)
lp1632b01.zip
Other information:
libpng-1.6.31-README.txt
libpng-1.6.31-LICENSE.txt
libpng-1.6.31-*.asc (armored detached GPG signatures)
1.6.32beta01-README.txt
1.6.32beta01-LICENSE.txt
libpng-1.6.32beta01-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.30):
Changes since the last public release (1.6.31):
Guard the definition of _POSIX_SOURCE in pngpriv.h (AIX already defines it;
bug report by Michael Felt).
Revised pngpriv.h to work around failure to compile arm/filter_neon.S
("typedef" directive is unrecognized by the assembler). The problem
was introduced in libpng-1.6.30beta01.
Added "Requires: zlib" to libpng.pc.in (Pieter Neerincx).
Added special case for FreeBSD in arm/filter_neon.S (Maya Rashish).
Added instructions for disabling hardware optimizations in INSTALL.
Added "--enable-hardware-optimizations" configuration flag to enable
or disable all hardware optimizations with one flag.
Updated CMakeLists.txt to add INTEL_SSE and MIPS_MSA platforms.
Changed "int" to "png_size_t" in intel/filter_sse2.c to prevent
possible integer overflow (Bug report by John Bowler).
Quieted "declaration after statement" warnings in intel/filter_sse2.c.
Added scripts/makefile-linux-opt, which has hardware optimizations enabled.
Removed one of the GCC-7.1.0 'strict-overflow' warnings that result when
integers appear on both sides of a compare. Worked around the others by
forcing the strict-overflow setting in the relevant functions to a level
where they are not reported (John Bowler).
Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like
the space.
Worked around some C-style casts from (void*) because g++ 5.4.0 objects
to them.
Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint
overflow' check that is on by default with -Wall -Wextra.
Added eXIf chunk support.
Added a minimal eXIf chunk (with Orientation and FocalLengthIn35mmFilm
tags) to pngtest.png.
Version 1.6.32beta01 [July 31, 2017]
Avoid possible NULL dereference in png_handle_eXIf when benign_errors
are allowed. Avoid leaking the input buffer "eXIf_buf".
Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif
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

11
CHANGES
View File

@@ -5908,6 +5908,17 @@ Version 1.6.31rc02 [July 25, 2017]
Version 1.6.31 [July 27, 2017]
No changes.
Version 1.6.32beta01 [July 31, 2017]
Avoid possible NULL dereference in png_handle_eXIf when benign_errors
are allowed. Avoid leaking the input buffer "eXIf_buf".
Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif
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
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

View File

@@ -36,7 +36,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 31)
set(PNGLIB_RELEASE 32)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -817,7 +817,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.31
# VERSION 16.${PNGLIB_RELEASE}.1.6.32beta01
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)

View File

@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.31, 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

2
README
View File

@@ -1,4 +1,4 @@
README for libpng version 1.6.31 - July 27, 2017 (shared library 16.0)
README for libpng version 1.6.32beta01 - July 31, 2017 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.31 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
AC_INIT([libpng],[1.6.31],[png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng],[1.6.32beta01],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,10 +46,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
PNGLIB_VERSION=1.6.31
PNGLIB_VERSION=1.6.32beta01
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
PNGLIB_RELEASE=31
PNGLIB_RELEASE=32
dnl End of version number stuff

View File

@@ -5,7 +5,7 @@
* Written by Mike Klein and Matt Sarett
* Derived from arm/filter_neon_intrinsics.c
*
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.31 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.31 - July 27, 2017
libpng version 1.6.32beta01 - July 31, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
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.31 - 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)
@@ -5404,7 +5404,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.31 are Y2K compliant. It is my belief that earlier
upward through 1.6.32beta01 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer

View File

@@ -1,6 +1,6 @@
.TH LIBPNG 3 "July 27, 2017"
.TH LIBPNG 3 "July 31, 2017"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.31
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta01
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -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.31 - July 27, 2017
libpng version 1.6.32beta01 - July 31, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
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.31 - 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)
@@ -5918,7 +5918,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.31 are Y2K compliant. It is my belief that earlier
upward through 1.6.32beta01 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -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.31 - 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.31, 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

View File

@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "April 1, 2017"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.31
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.32beta01
(private functions)
.SH SYNOPSIS
\fB\fB#include \fI\fI"pngpriv.h"

6
png.c
View File

@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_31 Your_png_h_is_not_version_1_6_31;
typedef png_libpng_version_1_6_32beta01 Your_png_h_is_not_version_1_6_32beta01;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@@ -806,14 +806,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.31 - July 27, 2017" PNG_STRING_NEWLINE \
"libpng version 1.6.32beta01 - July 31, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.31 - July 27, 2017\
return "libpng version 1.6.32beta01 - July 31, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";

34
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.31, July 27, 2017
* libpng version 1.6.32beta01, July 31, 2017
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
* Authors and maintainers:
* 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.97, January 1998, through 1.6.31, July 27, 2017:
* libpng versions 0.97, January 1998, through 1.6.32beta01, July 31, 2017:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -25,7 +25,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.31, 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
@@ -213,7 +213,7 @@
* ...
* 1.5.28 15 10527 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 major
* and minor numbers; the shared-library major version number will be
@@ -241,13 +241,13 @@
* Y2K compliance in libpng:
* =========================
*
* July 27, 2017
* July 31, 2017
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.31 are Y2K compliant. It is my belief that
* upward through 1.6.32beta01 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -309,8 +309,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.31"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.31 - July 27, 2017\n"
#define PNG_LIBPNG_VER_STRING "1.6.32beta01"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.32beta01 - July 31, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -318,13 +318,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 31
#define PNG_LIBPNG_VER_RELEASE 32
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 01
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -341,7 +341,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -349,7 +349,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10631 /* 1.6.31 */
#define PNG_LIBPNG_VER 10632 /* 1.6.32 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -459,7 +459,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_6_31;
typedef char* png_libpng_version_1_6_32beta01;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -2010,10 +2010,10 @@ 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_inforp info_ptr, png_bytep *exif));
PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, const png_bytep exif));
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_1, (png_const_structrp png_ptr,
png_inforp info_ptr, png_uint_32 num_exif, const png_bytep exif));
#endif
#ifdef PNG_gAMA_SUPPORTED

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.6.31, July 27, 2017
* libpng version 1.6.32beta01, July 31, 2017
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
* Last changed in libpng 1.6.26 [October 20, 2016]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -775,14 +775,15 @@ 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_bytep *exif)
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);
}

View File

@@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -1143,6 +1143,11 @@ PNG_INTERNAL_FUNCTION(void,png_write_sRGB,(png_structrp png_ptr,
int intent),PNG_EMPTY);
#endif
#ifdef PNG_WRITE_eXIf_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_write_eXIf,(png_structrp png_ptr,
png_bytep exif, int num_exif),PNG_EMPTY);
#endif
#ifdef PNG_WRITE_iCCP_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr,
png_const_charp name, png_const_bytep profile), PNG_EMPTY);

View File

@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -175,6 +175,11 @@ png_read_info(png_structrp png_ptr, png_inforp info_ptr)
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
#ifdef PNG_READ_eXIf_SUPPORTED
else if (chunk_name == png_eXIf)
png_handle_eXIf(png_ptr, info_ptr, length);
#endif
#ifdef PNG_READ_gAMA_SUPPORTED
else if (chunk_name == png_gAMA)
png_handle_gAMA(png_ptr, info_ptr, length);
@@ -842,6 +847,11 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
#ifdef PNG_READ_eXIf_SUPPORTED
else if (chunk_name == png_eXIf)
png_handle_eXIf(png_ptr, info_ptr, length);
#endif
#ifdef PNG_READ_gAMA_SUPPORTED
else if (chunk_name == png_gAMA)
png_handle_gAMA(png_ptr, info_ptr, length);

View File

@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -2021,7 +2021,7 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
png_chunk_error(png_ptr, "missing IHDR");
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_eXIf) != 0)
else if (info_ptr == NULL || (info_ptr->valid & PNG_INFO_eXIf) != 0)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "duplicate");
@@ -2041,9 +2041,9 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if (png_crc_finish(png_ptr, 0) != 0)
return;
info_ptr->num_exif = length;
png_set_eXIf_1(png_ptr, info_ptr, length, eXIf_buf);
png_set_eXIf(png_ptr, info_ptr, eXIf_buf);
png_free(png_ptr, eXIf_buf);
}
#endif

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.6.30 [June 28, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -136,8 +136,8 @@ 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,
const png_bytep eXIf_buf)
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;
@@ -148,19 +148,20 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
png_free_data(png_ptr, info_ptr, PNG_FREE_EXIF, 0);
info_ptr->num_exif = num_exif;
info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr,
info_ptr->num_exif));
if (info_ptr->exif == NULL)
{
png_warning(png_ptr, "Insufficient memory for eXIf chunk data");
return;
}
info_ptr->free_me |= PNG_FREE_EXIF;
for (i = 0; i < info_ptr->num_exif; i++)
for (i = 0; i < (int) num_exif; i++)
info_ptr->exif[i] = eXIf_buf[i];
info_ptr->valid |= PNG_INFO_eXIf;

View File

@@ -1,7 +1,7 @@
/* pngstruct.h - header file for PNG reference library
*
* Last changed in libpng 1.6.28 [January 5, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -479,8 +479,5 @@ struct png_struct_def
png_colorspace colorspace;
#endif
#endif
/* New member added in libpng-1.6.31 */
int num_exif;
};
#endif /* PNGSTRUCT_H */

View File

@@ -1,8 +1,8 @@
/* pngtest.c - a simple test program to test libpng
*
* Last changed in libpng 1.6.26 [October 20, 2016]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -1195,9 +1195,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_eXIf_SUPPORTED
{
png_bytep exif;
png_uint_32 exif_length;
if (png_get_eXIf(read_ptr, read_info_ptr, &exif) != 0)
png_set_eXIf(write_ptr, write_info_ptr, exif);
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_1(write_ptr, write_info_ptr, exif_length, exif);
}
}
#endif
#ifdef PNG_hIST_SUPPORTED
@@ -1406,6 +1411,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
write_chunks(write_ptr, before_IDAT); /* after PLTE */
png_write_info(write_ptr, write_end_info_ptr);
write_chunks(write_ptr, after_IDAT); /* after IDAT */
#ifdef PNG_COMPRESSION_COMPAT
/* Test the 'compatibility' setting here, if it is available. */
png_set_compression(write_ptr, PNG_COMPRESSION_COMPAT);
@@ -1541,9 +1550,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_eXIf_SUPPORTED
{
png_bytep exif;
png_uint_32 exif_length;
if (png_get_eXIf(read_ptr, end_info_ptr, &exif) != 0)
png_set_eXIf(write_ptr, write_end_info_ptr, exif);
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_1(write_ptr, write_end_info_ptr, exif_length, exif);
}
}
#endif
#ifdef PNG_tIME_SUPPORTED
@@ -2104,4 +2118,4 @@ main(void)
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_31 Your_png_h_is_not_version_1_6_31;
typedef png_libpng_version_1_6_32beta01 Your_png_h_is_not_version_1_6_32beta01;

View File

@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
* Last changed in libpng 1.6.31 [July 27, 2017]
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -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

View File

@@ -1,8 +1,8 @@
/* pngwutil.c - utilities to write a PNG file
*
* Last changed in libpng 1.6.26 [October 20, 2016]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* Last changed in libpng 1.6.32 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -1479,24 +1479,15 @@ void /* PRIVATE */
png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif)
{
int i;
png_byte buf[3];
png_byte buf[1];
png_debug(1, "in png_write_eXIf");
if (num_exif > (int)png_ptr->num_exif)
{
png_debug2(3, "num_exif = %d, png_ptr->num_exif = %d", num_exif,
png_ptr->num_exif);
png_warning(png_ptr, "Invalid number of exif bytes specified");
return;
}
png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif));
for (i = 0; i < num_exif; i++)
{
buf[i] = exif[i];
buf[0] = exif[i];
png_write_chunk_data(png_ptr, buf, (png_size_t)1);
}

View File

@@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.6.31 - July 27, 2017
libpng version 1.6.32beta01 - July 31, 2017
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson

View File

@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.6.31 - July 27, 2017
* libpng version 1.6.32beta01 - July 31, 2017
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@@ -1,11 +1,11 @@
Makefiles for libpng version 1.6.31 - July 27, 2017
Makefiles for libpng version 1.6.32beta01 - July 31, 2017
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
(gcc, creates libpng16.so.16.1.6.31)
(gcc, creates libpng16.so.16.1.6.32beta01)
makefile.linux-opt=> Linux/ELF makefile with hardware optimizations on
(gcc, creates libpng16.so.16.1.6.31)
(gcc, creates libpng16.so.16.1.6.32beta01)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -35,12 +35,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng16.so.16.1.6.31)
creates libpng16.so.16.1.6.32beta01)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng16.so.16.1.6.31)
creates libpng16.so.16.1.6.32beta01)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng16.so.16.1.6.31)
creates libpng16.so.16.1.6.32beta01)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile

View File

@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
PNG_DFN ";Version 1.6.31"
PNG_DFN ";Version 1.6.32beta01"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"

View File

@@ -11,7 +11,7 @@
# Modeled after libxml-config.
version=1.6.31
version=1.6.32beta01
prefix=""
libdir=""
libs=""

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
Version: 1.6.31
Version: 1.6.32beta01
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}

View File

@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 6
VERMIC = 31
VERMIC = 32
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)

View File

@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
RELEASE = 31
RELEASE = 32
# Shared library names:
LIBSO=$(LIBNAME).so

View File

@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
RELEASE = 31
RELEASE = 32
# Shared library names:
LIBSO=$(LIBNAME).so

View File

@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
RELEASE = 31
RELEASE = 32
# Shared library names:
LIBSO=$(LIBNAME).dll

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.6.31
SHLIB_MINOR= 1.6.32beta01
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.31
SHLIB_MINOR= 1.6.32beta01
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.31
SHLIB_MINOR= 1.6.32beta01
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@@ -741,7 +741,6 @@ setting IDAT_READ_SIZE default PNG_ZBUF_SIZE
# Ancillary chunks
chunk bKGD
chunk cHRM enables COLORSPACE
# enable eXIf only after chunk is approved
chunk eXIf
chunk gAMA enables GAMMA
chunk hIST

View File

@@ -1,8 +1,8 @@
/* libpng 1.6.31 STANDARD API DEFINITION */
/* libpng 1.6.32beta01 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* Libpng version 1.6.31 - July 27, 2017 */
/* Libpng version 1.6.32beta01 - July 31, 2017 */
/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */

View File

@@ -1,4 +1,4 @@
;Version 1.6.31
;Version 1.6.32beta01
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng
@@ -250,5 +250,5 @@ EXPORTS
png_get_palette_max @243
png_set_option @244
png_image_write_to_memory @245
png_get_eXIf @246
png_set_eXIf @247
png_get_eXIf_1 @246
png_set_eXIf_1 @247