Compare commits

...

8 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
9c5ed64946 [libpng15] Imported from libpng-1.5.22rc02.tar 2015-03-09 09:22:20 -05:00
Glenn Randers-Pehrson
687d018609 [libpng15] Merged png_free_data() with libpng-1.6.17 2015-03-09 09:08:12 -05:00
Glenn Randers-Pehrson
d50ec244d2 [libpng15] Removed some comments that the configure script did not handle
properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt.
Bump version to 1.5.22rc02
2015-03-05 21:07:11 -06:00
Glenn Randers-Pehrson
17b747c8a6 [libpng15] Imported from libpng-1.5.22rc01.tar 2015-03-04 11:19:19 -06:00
Glenn Randers-Pehrson
af625883d6 [libpng15] Bump version to 1.5.22beta05 2015-02-25 15:42:09 -06:00
Glenn Randers-Pehrson
ddc5beaa89 [libpng15] Imported from libpng-1.5.22beta04.tar 2015-02-25 15:17:31 -06:00
Glenn Randers-Pehrson
74aa31a7c5 [libpng15] Relocated a misplaced "}" in png_reciprocal2(). 2015-02-24 12:36:13 -06:00
Glenn Randers-Pehrson
193eb0b717 [libpng15] Bump version to 1.5.22beta04 2015-02-21 12:48:59 -06:00
30 changed files with 197 additions and 187 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.5.22beta03 - February 21, 2015
Libpng 1.5.22rc02 - March 9, 2015
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.
@@ -9,21 +9,21 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
1.5.22beta03.tar.xz (LZMA-compressed, recommended)
1.5.22beta03.tar.gz
1.5.22beta03.tar.bz2
1.5.22rc02.tar.xz (LZMA-compressed, recommended)
1.5.22rc02.tar.gz
1.5.22rc02.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lp1522b03.7z (LZMA-compressed, recommended)
lp1522b03.zip
lp1522r02.7z (LZMA-compressed, recommended)
lp1522r02.zip
Other information:
1.5.22beta03-README.txt
1.5.22beta03-LICENSE.txt
libpng-1.5.22beta03-*.asc (armored detached GPG signatures)
1.5.22rc02-README.txt
1.5.22rc02-LICENSE.txt
libpng-1.5.22rc02-*.asc (armored detached GPG signatures)
Changes since the last public release (1.5.21):
@@ -46,6 +46,17 @@ Version 1.5.22beta03 [February 21, 2015]
Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins).
Rebuilt configure scripts with automake-1.15 and libtool-2.4.6
Version 1.5.22beta04 [February 25, 2015]
Relocated a misplaced "}" in png_reciprocal2().
Version 1.5.22rc01 [March 4, 2015]
No changes.
Version 1.5.22rc02 [March 9, 2015]
Removed some comments that the configure script did not handle
properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt.
Merged png_free_data() with libpng-1.6.17
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

11
CHANGES
View File

@@ -4310,6 +4310,17 @@ Version 1.5.22beta03 [February 21, 2015]
Allow user to call png_get_IHDR() with NULL arguments (Reuben Hawkins).
Rebuilt configure scripts with automake-1.15 and libtool-2.4.6
Version 1.5.22beta04 [February 25, 2015]
Relocated a misplaced "}" in png_reciprocal2().
Version 1.5.22rc01 [March 4, 2015]
No changes.
Version 1.5.22rc02 [March 9, 2015]
Removed some comments that the configure script did not handle
properly from scripts/pnglibconf.dfa and pnglibconf.h.prebuilt.
Merged png_free_data() with libpng-1.6.17
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

@@ -219,7 +219,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 15.${PNGLIB_RELEASE}.1.5.22beta03
# VERSION 15.${PNGLIB_RELEASE}.1.5.22rc02
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
CLEAN_DIRECT_OUTPUT 1)

View File

@@ -184,7 +184,7 @@ run "make install".
VIII. Configuring libpng for 16-bit platforms
You will want to look into zconf.h to tell zlib (and thus libpng) that
it cannot allocate more then 64K at a time. Even if you can, the memory
it cannot allocate more than 64K at a time. Even if you can, the memory
won't be accessible. So limit zlib and libpng to 64K by defining MAXSEG_64K.
IX. Configuring for DOS

View File

@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta03, February 21, 2015, are
libpng versions 1.2.6, August 15, 2004, through 1.5.22rc02, March 9, 2015, are
Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
February 21, 2015
March 9, 2015

2
README
View File

@@ -1,4 +1,4 @@
README for libpng version 1.5.22beta03 - February 21, 2015 (shared library 15.0)
README for libpng version 1.5.22rc02 - March 9, 2015 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

22
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for libpng 1.5.22beta03.
# Generated by GNU Autoconf 2.69 for libpng 1.5.22rc02.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.5.22beta03'
PACKAGE_STRING='libpng 1.5.22beta03'
PACKAGE_VERSION='1.5.22rc02'
PACKAGE_STRING='libpng 1.5.22rc02'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL=''
@@ -1354,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures libpng 1.5.22beta03 to adapt to many kinds of systems.
\`configure' configures libpng 1.5.22rc02 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1424,7 +1424,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.5.22beta03:";;
short | recursive ) echo "Configuration of libpng 1.5.22rc02:";;
esac
cat <<\_ACEOF
@@ -1579,7 +1579,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libpng configure 1.5.22beta03
libpng configure 1.5.22rc02
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2002,7 +2002,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libpng $as_me 1.5.22beta03, which was
It was created by libpng $as_me 1.5.22rc02, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2865,7 +2865,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
VERSION='1.5.22beta03'
VERSION='1.5.22rc02'
cat >>confdefs.h <<_ACEOF
@@ -2982,7 +2982,7 @@ fi
PNGLIB_VERSION=1.5.22beta03
PNGLIB_VERSION=1.5.22rc02
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
PNGLIB_RELEASE=22
@@ -14124,7 +14124,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by libpng $as_me 1.5.22beta03, which was
This file was extended by libpng $as_me 1.5.22rc02, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14190,7 +14190,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
libpng config.status 1.5.22beta03
libpng config.status 1.5.22rc02
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@@ -18,12 +18,12 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
AC_INIT([libpng], [1.5.22beta03], [png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng], [1.5.22rc02], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE([1.13 serial-tests subdir-objects])
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
PNGLIB_VERSION=1.5.22beta03
PNGLIB_VERSION=1.5.22rc02
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
PNGLIB_RELEASE=22

View File

@@ -1,6 +1,6 @@
Libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.5.22beta03 - February 21, 2015
libpng version 1.5.22rc02 - March 9, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 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.5.22beta03 - February 21, 2015
libpng versions 0.97, January 1998, through 1.5.22rc02 - March 9, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -317,7 +317,7 @@ prediction.
If you are intending to keep the file pointer open for use in libpng,
you must ensure you don't read more than 8 bytes from the beginning
of the file, and you also have to make a call to png_set_sig_bytes_read()
of the file, and you also have to make a call to png_set_sig_bytes()
with the number of bytes you read from the beginning. Libpng will
then only check the bytes (if any) that your program didn't read.
@@ -1787,7 +1787,7 @@ value when you call it in this position:
png_set_gamma(png_ptr, screen_gamma, 0.45455);
If you need to reduce an RGB file to a paletted file, or if a paletted
file has more entries then will fit on your screen, png_set_quantize()
file has more entries than will fit on your screen, png_set_quantize()
will do that. Note that this is a simple match quantization that merely
finds the closest color available. This should work fairly well with
optimized palettes, but fairly badly with linear color cubes. If you
@@ -2332,7 +2332,7 @@ png_infop info_ptr;
64K. The library seems to run fine with sizes
of 4K. Although you can give it much less if
necessary (I assume you can give it chunks of
1 byte, I haven't tried less then 256 bytes
1 byte, I haven't tried less than 256 bytes
yet). When this function returns, you may
want to display any rows that were generated
in the row callback if you don't already do
@@ -4535,13 +4535,13 @@ Other rules can be inferred by inspecting the libpng source.
XIV. Y2K Compliance in libpng
February 21, 2015
March 9, 2015
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.5.22beta03 are Y2K compliant. It is my belief that earlier
upward through 1.5.22rc02 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 "February 21, 2015"
.TH LIBPNG 3 "March 9, 2015"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta03
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22rc02
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -492,7 +492,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.5.22beta03 - February 21, 2015
libpng version 1.5.22rc02 - March 9, 2015
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -503,7 +503,7 @@ Libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.5.22beta03 - February 21, 2015
libpng versions 0.97, January 1998, through 1.5.22rc02 - March 9, 2015
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson
@@ -809,7 +809,7 @@ prediction.
If you are intending to keep the file pointer open for use in libpng,
you must ensure you don't read more than 8 bytes from the beginning
of the file, and you also have to make a call to png_set_sig_bytes_read()
of the file, and you also have to make a call to png_set_sig_bytes()
with the number of bytes you read from the beginning. Libpng will
then only check the bytes (if any) that your program didn't read.
@@ -2279,7 +2279,7 @@ value when you call it in this position:
png_set_gamma(png_ptr, screen_gamma, 0.45455);
If you need to reduce an RGB file to a paletted file, or if a paletted
file has more entries then will fit on your screen, png_set_quantize()
file has more entries than will fit on your screen, png_set_quantize()
will do that. Note that this is a simple match quantization that merely
finds the closest color available. This should work fairly well with
optimized palettes, but fairly badly with linear color cubes. If you
@@ -2824,7 +2824,7 @@ png_infop info_ptr;
64K. The library seems to run fine with sizes
of 4K. Although you can give it much less if
necessary (I assume you can give it chunks of
1 byte, I haven't tried less then 256 bytes
1 byte, I haven't tried less than 256 bytes
yet). When this function returns, you may
want to display any rows that were generated
in the row callback if you don't already do
@@ -5027,13 +5027,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIV. Y2K Compliance in libpng
February 21, 2015
March 9, 2015
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.5.22beta03 are Y2K compliant. It is my belief that earlier
upward through 1.5.22rc02 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
@@ -5277,7 +5277,8 @@ the first widely used release:
1.5.21beta01-02 15 10521 15.so.15.21[.0]
1.5.21rc01-03 15 10521 15.so.15.21[.0]
1.5.21 15 10521 15.so.15.21[.0]
1.5.22beta01-03 15 10522 15.so.15.22[.0]
1.5.22beta01-04 15 10522 15.so.15.22[.0]
1.5.22rc01-02 15 10522 15.so.15.22[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -5334,7 +5335,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.5.22beta03 - February 21, 2015:
Libpng version 1.5.22rc02 - March 9, 2015:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -5357,7 +5358,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.22beta03, February 21, 2015, are
libpng versions 1.2.6, August 15, 2004, through 1.5.22rc02, March 9, 2015, are
Copyright (c) 2004,2006-20014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -5456,7 +5457,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
February 21, 2015
March 9, 2015
.\" end of man page

View File

@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "February 21, 2015"
.TH LIBPNGPF 3 "March 9, 2015"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22beta03
libpng \- Portable Network Graphics (PNG) Reference Library 1.5.22rc02
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "February 21, 2015"
.TH PNG 5 "March 9, 2015"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

171
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_5_22beta03 Your_png_h_is_not_version_1_5_22beta03;
typedef png_libpng_version_1_5_22rc02 Your_png_h_is_not_version_1_5_22rc02;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -343,42 +343,43 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#ifdef PNG_TEXT_SUPPORTED
/* Free text item num or (if num == -1) all text items */
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
if (info_ptr->text != 0 &&
((mask & PNG_FREE_TEXT) & info_ptr->free_me) != 0)
{
if (num != -1)
{
if (info_ptr->text && info_ptr->text[num].key)
{
png_free(png_ptr, info_ptr->text[num].key);
info_ptr->text[num].key = NULL;
}
png_free(png_ptr, info_ptr->text[num].key);
info_ptr->text[num].key = NULL;
}
else
{
int i;
for (i = 0; i < info_ptr->num_text; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, i);
png_free(png_ptr, info_ptr->text[i].key);
png_free(png_ptr, info_ptr->text);
info_ptr->text = NULL;
info_ptr->num_text=0;
info_ptr->num_text = 0;
}
}
#endif
#ifdef PNG_tRNS_SUPPORTED
/* Free any tRNS entry */
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
if (((mask & PNG_FREE_TRNS) & info_ptr->free_me) != 0)
{
info_ptr->valid &= ~PNG_INFO_tRNS;
png_free(png_ptr, info_ptr->trans_alpha);
info_ptr->trans_alpha = NULL;
info_ptr->valid &= ~PNG_INFO_tRNS;
info_ptr->num_trans = 0;
}
#endif
#ifdef PNG_sCAL_SUPPORTED
/* Free any sCAL entry */
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
if (((mask & PNG_FREE_SCAL) & info_ptr->free_me) != 0)
{
png_free(png_ptr, info_ptr->scal_s_width);
png_free(png_ptr, info_ptr->scal_s_height);
@@ -390,20 +391,20 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#ifdef PNG_pCAL_SUPPORTED
/* Free any pCAL entry */
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
if (((mask & PNG_FREE_PCAL) & info_ptr->free_me) != 0)
{
png_free(png_ptr, info_ptr->pcal_purpose);
png_free(png_ptr, info_ptr->pcal_units);
info_ptr->pcal_purpose = NULL;
info_ptr->pcal_units = NULL;
if (info_ptr->pcal_params != NULL)
{
int i;
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
{
for (i = 0; i < info_ptr->pcal_nparams; i++)
png_free(png_ptr, info_ptr->pcal_params[i]);
info_ptr->pcal_params[i] = NULL;
}
png_free(png_ptr, info_ptr->pcal_params);
info_ptr->pcal_params = NULL;
}
@@ -412,8 +413,8 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#endif
#ifdef PNG_iCCP_SUPPORTED
/* Free any iCCP entry */
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
/* Free any profile entry */
if (((mask & PNG_FREE_ICCP) & info_ptr->free_me) != 0)
{
png_free(png_ptr, info_ptr->iccp_name);
png_free(png_ptr, info_ptr->iccp_profile);
@@ -425,74 +426,62 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#ifdef PNG_sPLT_SUPPORTED
/* Free a given sPLT entry, or (if num == -1) all sPLT entries */
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
if (info_ptr->splt_palettes != 0 &&
((mask & PNG_FREE_SPLT) & info_ptr->free_me) != 0)
{
if (num != -1)
{
if (info_ptr->splt_palettes)
{
png_free(png_ptr, info_ptr->splt_palettes[num].name);
png_free(png_ptr, info_ptr->splt_palettes[num].entries);
info_ptr->splt_palettes[num].name = NULL;
info_ptr->splt_palettes[num].entries = NULL;
}
}
else
{
if (info_ptr->splt_palettes_num)
{
int i;
for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_SPLT, i);
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes = NULL;
info_ptr->splt_palettes_num = 0;
}
info_ptr->valid &= ~PNG_INFO_sPLT;
}
}
#endif
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (png_ptr->unknown_chunk.data)
{
png_free(png_ptr, png_ptr->unknown_chunk.data);
png_ptr->unknown_chunk.data = NULL;
}
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
{
if (num != -1)
{
if (info_ptr->unknown_chunks)
{
png_free(png_ptr, info_ptr->unknown_chunks[num].data);
info_ptr->unknown_chunks[num].data = NULL;
}
png_free(png_ptr, info_ptr->splt_palettes[num].name);
png_free(png_ptr, info_ptr->splt_palettes[num].entries);
info_ptr->splt_palettes[num].name = NULL;
info_ptr->splt_palettes[num].entries = NULL;
}
else
{
int i;
if (info_ptr->unknown_chunks_num)
for (i = 0; i < info_ptr->splt_palettes_num; i++)
{
for (i = 0; i < info_ptr->unknown_chunks_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);
png_free(png_ptr, info_ptr->unknown_chunks);
info_ptr->unknown_chunks = NULL;
info_ptr->unknown_chunks_num = 0;
png_free(png_ptr, info_ptr->splt_palettes[i].name);
png_free(png_ptr, info_ptr->splt_palettes[i].entries);
}
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes = NULL;
info_ptr->splt_palettes_num = 0;
info_ptr->valid &= ~PNG_INFO_sPLT;
}
}
#endif
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (info_ptr->unknown_chunks != 0 &&
((mask & PNG_FREE_UNKN) & info_ptr->free_me) != 0)
{
if (num != -1)
{
png_free(png_ptr, info_ptr->unknown_chunks[num].data);
info_ptr->unknown_chunks[num].data = NULL;
}
else
{
int i;
for (i = 0; i < info_ptr->unknown_chunks_num; i++)
png_free(png_ptr, info_ptr->unknown_chunks[i].data);
png_free(png_ptr, info_ptr->unknown_chunks);
info_ptr->unknown_chunks = NULL;
info_ptr->unknown_chunks_num = 0;
}
}
#endif
#ifdef PNG_hIST_SUPPORTED
/* Free any hIST entry */
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
if (((mask & PNG_FREE_HIST) & info_ptr->free_me) != 0)
{
png_free(png_ptr, info_ptr->hist);
info_ptr->hist = NULL;
@@ -501,9 +490,9 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#endif
/* Free any PLTE entry that was internally allocated */
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
if (((mask & PNG_FREE_PLTE) & info_ptr->free_me) != 0)
{
png_zfree(png_ptr, info_ptr->palette);
png_free(png_ptr, info_ptr->palette);
info_ptr->palette = NULL;
info_ptr->valid &= ~PNG_INFO_PLTE;
info_ptr->num_palette = 0;
@@ -511,16 +500,14 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Free any image bits attached to the info structure */
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
if (((mask & PNG_FREE_ROWS) & info_ptr->free_me) != 0)
{
if (info_ptr->row_pointers)
if (info_ptr->row_pointers != 0)
{
int row;
for (row = 0; row < (int)info_ptr->height; row++)
{
png_uint_32 row;
for (row = 0; row < info_ptr->height; row++)
png_free(png_ptr, info_ptr->row_pointers[row]);
info_ptr->row_pointers[row] = NULL;
}
png_free(png_ptr, info_ptr->row_pointers);
info_ptr->row_pointers = NULL;
}
@@ -661,13 +648,13 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.22beta03 - February 21, 2015" PNG_STRING_NEWLINE \
"libpng version 1.5.22rc02 - March 9, 2015" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2015 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.5.22beta03 - February 21, 2015\
return "libpng version 1.5.22rc02 - March 9, 2015\
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2138,18 +2125,18 @@ png_reciprocal2(png_fixed_point a, png_fixed_point b)
if (r <= 2147483647. && r >= -2147483648.)
return (png_fixed_point)r;
#else
/* This may overflow because the range of png_fixed_point isn't
* symmetric, but this API is only used for the product of file and
* screen gamma so it doesn't matter that the smallest number it can
* produce is 1/21474, not 1/100000
*/
png_fixed_point res = png_product2(a, b);
if (res != 0)
return png_reciprocal(res);
#endif
}
#else
/* This may overflow because the range of png_fixed_point isn't
* symmetric, but this API is only used for the product of file and
* screen gamma so it doesn't matter that the smallest number it can
* produce is 1/21474, not 1/100000
*/
png_fixed_point res = png_product2(a, b);
if (res != 0)
return png_reciprocal(res);
#endif
return 0; /* overflow */
}

24
png.h
View File

@@ -1,7 +1,8 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.5.22beta03 - February 21, 2015
* libpng version 1.5.22rc02, March 9, 2015
*
* Copyright (c) 1998-2015 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.)
@@ -11,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.5.22beta03 - February 21, 2015: Glenn
* libpng versions 0.97, January 1998, through 1.5.22rc02, March 9, 2015: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -205,7 +206,8 @@
* 1.5.21beta01-02 15 10521 15.so.15.21[.0]
* 1.5.21rc01-03 15 10521 15.so.15.21[.0]
* 1.5.21 15 10521 15.so.15.21[.0]
* 1.5.22beta01-03 15 10522 15.so.15.22[.0]
* 1.5.22beta01-04 15 10522 15.so.15.22[.0]
* 1.5.22rc01-02 15 10522 15.so.15.22[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -237,7 +239,7 @@
*
* This code is released under the libpng license.
*
* libpng versions 1.2.6, August 15, 2004, through 1.5.22beta03, February 21, 2015, are
* libpng versions 1.2.6, August 15, 2004, through 1.5.22rc02, March 9, 2015, are
* Copyright (c) 2004, 2006-2015 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -349,13 +351,13 @@
* Y2K compliance in libpng:
* =========================
*
* February 21, 2015
* March 9, 2015
*
* 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.5.22beta03 are Y2K compliant. It is my belief that
* upward through 1.5.22rc02 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
@@ -416,9 +418,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.5.22beta03"
#define PNG_LIBPNG_VER_STRING "1.5.22rc02"
#define PNG_HEADER_VERSION_STRING \
" libpng version 1.5.22beta03 - February 21, 2015\n"
" libpng version 1.5.22rc02 - March 9, 2015\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
@@ -432,7 +434,7 @@
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 03
#define PNG_LIBPNG_VER_BUILD 02
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -449,7 +451,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_BETA
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -579,7 +581,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_5_22beta03;
typedef char* png_libpng_version_1_5_22rc02;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to

View File

@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng version 1.5.22beta03 - February 21, 2015
* libpng version 1.5.22rc02, March 9, 2015
*
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -11,9 +11,7 @@
* For conditions of distribution and use, see the disclaimer
* and license in png.h
*
*/
/* Any machine specific code is near the front of this file, so if you
* Any machine specific code is near the front of this file, so if you
* are configuring libpng for a machine, you may want to read the section
* starting here down to where it starts to typedef png_color, png_text,
* and png_info.

View File

@@ -102,7 +102,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
}
/* Allocate memory. For reasonable files, size should never exceed
* 64K. However, zlib may allocate more then 64K if you don't tell
* 64K. However, zlib may allocate more than 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
@@ -475,7 +475,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
}
/* Allocate memory. For reasonable files, size should never exceed
* 64K. However, zlib may allocate more then 64K if you don't tell
* 64K. However, zlib may allocate more than 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.

View File

@@ -26,7 +26,7 @@
* reads from a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
* buffering if you are using unbuffered reads. This should never be asked
* to read more then 64K on a 16 bit machine.
* to read more than 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)

View File

@@ -468,7 +468,7 @@ pngtest_error(png_structp png_ptr, png_const_charp message)
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
/* Allocate memory. For reasonable files, size should never exceed
* 64K. However, zlib may allocate more then 64K if you don't tell
* 64K. However, zlib may allocate more than 64K if you don't tell
* it not to. See zconf.h and png.h for more information. zlib does
* need to allocate exactly 64K, so whatever you call here must
* have the ability to do that.
@@ -2024,4 +2024,4 @@ main(void)
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_5_22beta03 Your_png_h_is_not_version_1_5_22beta03;
typedef png_libpng_version_1_5_22rc02 Your_png_h_is_not_version_1_5_22rc02;

View File

@@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.5.22beta03 - February 21, 2015
libpng version 1.5.22rc02 - March 9, 2015
Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.5.22beta03 - February 21, 2015
* libpng version 1.5.22rc02 - March 9, 2015
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@@ -1,9 +1,9 @@
Makefiles for libpng version 1.5.22beta03 - February 21, 2015
Makefiles for libpng version 1.5.22rc02 - March 9, 2015
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
(gcc, creates libpng15.so.15.1.5.22beta03)
(gcc, creates libpng15.so.15.1.5.22rc02)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -34,12 +34,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 libpng15.so.15.1.5.22beta03)
creates libpng15.so.15.1.5.22rc02)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng15.so.15.1.5.22beta03)
creates libpng15.so.15.1.5.22rc02)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng15.so.15.1.5.22beta03)
creates libpng15.so.15.1.5.22rc02)
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.5.22beta03"
PNG_DFN ";Version 1.5.22rc02"
#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.5.22beta03
version=1.5.22rc02
prefix=""
libdir=""
libs=""

View File

@@ -5,6 +5,6 @@ includedir=@includedir@/libpng15
Name: libpng
Description: Loads and saves PNG files
Version: 1.5.22beta03
Version: 1.5.22rc02
Libs: -L${libdir} -lpng15
Cflags: -I${includedir}

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng15
LIB= png15
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.5.22beta03
SHLIB_MINOR= 1.5.22rc02
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= 15
SHLIB_MINOR= 1.5.22beta03
SHLIB_MINOR= 1.5.22rc02
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= 15
SHLIB_MINOR= 1.5.22beta03
SHLIB_MINOR= 1.5.22rc02
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@@ -300,10 +300,10 @@ option USER_LIMITS requires READ
#
# Only chunks that are variable in number are counted towards the
# USER_CHUNK_CACHE_MAX limit
setting USER_WIDTH_MAX default 1000000 /* Use 0x7fffffff for unlimited */
setting USER_HEIGHT_MAX default 1000000 /* Use 0x7fffffff for unlimited */
setting USER_CHUNK_CACHE_MAX default 1000 /* Use 0 for unlimited */
setting USER_CHUNK_MALLOC_MAX default 8000000 /* Use 0 for unlimited */
setting USER_WIDTH_MAX default 1000000
setting USER_HEIGHT_MAX default 1000000
setting USER_CHUNK_CACHE_MAX default 1000
setting USER_CHUNK_MALLOC_MAX default 8000000
# If this option is enabled APIs to set the above limits at run time are added;
# without this the hardwired (compile time) limits will be used.
@@ -500,7 +500,7 @@ setting QUANTIZE_BLUE_BITS default 5
# are only interested in 8 bits anyway. Increasing this value
# results in more memory being used, and more pow() functions
# being called to fill in the gamma tables. Don't set this value
# less then 8, and even that may not work (I haven't tested it).
# less than 8, and even that may not work (I haven't tested it).
setting MAX_GAMMA_8 default 11

View File

@@ -1,7 +1,7 @@
/* 1.5.22beta03 STANDARD API DEFINITION */
/* 1.5.22rc02 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* libpng version 1.5.22beta03 - February 21, 2015 */
/* libpng version 1.5.22rc02 - March 9, 2015 */
/* Copyright (c) 1998-2013 Glenn Randers-Pehrson */
@@ -180,10 +180,10 @@
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5
#define PNG_QUANTIZE_RED_BITS 5
#define PNG_USER_CHUNK_CACHE_MAX 1000 /* Use 0 for unlimited */
#define PNG_USER_CHUNK_MALLOC_MAX 8000000 /* Use 0 for unlimited */
#define PNG_USER_HEIGHT_MAX 1000000 /* Use 0x7fffffff for unlimited */
#define PNG_USER_WIDTH_MAX 1000000 /* Use 0x7fffffff for unlimited */
#define PNG_USER_CHUNK_CACHE_MAX 1000
#define PNG_USER_CHUNK_MALLOC_MAX 8000000
#define PNG_USER_HEIGHT_MAX 1000000
#define PNG_USER_WIDTH_MAX 1000000
#define PNG_WEIGHT_SHIFT 8
#define PNG_ZBUF_SIZE 8192
#define PNG_sCAL_PRECISION 5

View File

@@ -1,4 +1,4 @@
;Version 1.5.22beta03
;Version 1.5.22rc02
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng