Imported from libpng-1.2.37beta03.tar

This commit is contained in:
Glenn Randers-Pehrson 2009-05-20 12:43:52 -05:00
parent c0d53e176b
commit e5ee05dc0d
66 changed files with 1969 additions and 1613 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.2.37rc01 - May 19, 2009
Libpng 1.2.37beta03 - May 20, 2009
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,37 +9,37 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.2.37rc01.tar.gz
libpng-1.2.37rc01.tar.lzma
libpng-1.2.37beta03.tar.gz
libpng-1.2.37beta03.tar.lzma
(Get the lzma codec from <http://tukaani.org/lzma>).
libpng-1.2.37rc01.tar.bz2
libpng-1.2.37beta03.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
libpng-1.2.37rc01-no-config.tar.gz
libpng-1.2.37rc01-no-config.tar.lzma
libpng-1.2.37rc01-no-config.tar.bz2
libpng-1.2.37beta03-no-config.tar.gz
libpng-1.2.37beta03-no-config.tar.lzma
libpng-1.2.37beta03-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lp1237r01.zip
lp1237r01.7z
lp1237r01.tar.bz2
lp1237b03.zip
lp1237b03.7z
lp1237b03.tar.bz2
Project files
libpng-1.2.37rc01-project-netware.zip
libpng-1.2.37rc01-project-wince.zip
libpng-1.2.37beta03-project-netware.zip
libpng-1.2.37beta03-project-wince.zip
Other information:
libpng-1.2.37rc01-README.txt
libpng-1.2.37rc01-KNOWNBUGS.txt
libpng-1.2.37rc01-LICENSE.txt
libpng-1.2.37rc01-Y2K-compliance.txt
libpng-1.2.37rc01-[previous version]-diff.txt
libpng-1.2.37beta03-README.txt
libpng-1.2.37beta03-KNOWNBUGS.txt
libpng-1.2.37beta03-LICENSE.txt
libpng-1.2.37beta03-Y2K-compliance.txt
libpng-1.2.37beta03-[previous version]-diff.txt
Changes since the last public release (1.2.36):
@ -59,7 +59,11 @@ version 1.2.37beta02 [May 19, 2009]
Added contrib/pngminim/preader to demonstrate building minimal progressive
decoder, based on contrib/gregbook with embedded libpng and zlib.
version 1.2.37rc01 [May 19, 2009]
version 1.2.37beta03 [May 20, 2009]
In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
is only one makefile in those directories, and revised the README files
accordingly.
Reformated sources in libpng style (3-space indentation, comment format)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net

View File

@ -2384,7 +2384,12 @@ version 1.2.37beta02 [May 19, 2009]
Added contrib/pngminim/preader to demonstrate building minimal progressive
decoder, based on contrib/gregbook with embedded libpng and zlib.
version 1.2.37rc01 [May 19, 2009]
version 1.2.37beta03 [May 20, 2009]
In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
is only one makefile in those directories, and revised the README files
accordingly.
Reformated sources in libpng style (3-space indentation, comment format)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

16
INSTALL
View File

@ -1,5 +1,5 @@
Installing libpng version 1.2.37rc01 - May 19, 2009
Installing libpng version 1.2.37beta03 - May 20, 2009
On Unix/Linux and similar systems, you can simply type
@ -44,7 +44,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
might be called "libpng-1.2.37rc01" or "lpng109" and "zlib-1.2.1"
might be called "libpng-1.2.37beta03" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@ -101,9 +101,9 @@ include
CMakeLists.txt => "cmake" script
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.37rc01)
gcc, creates libpng12.so.0.1.2.37beta03)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.37rc01)
(gcc, creates libpng12.so.0.1.2.37beta03)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@ -125,14 +125,14 @@ include
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc,
creates libpng12.so.0.1.2.37rc01)
creates libpng12.so.0.1.2.37beta03)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng12.so.0.1.2.37rc01)
creates libpng12.so.0.1.2.37beta03)
makefile.solaris-x86 => Solaris/intelMMX 2.X makefile (gcc,
creates libpng12.so.0.1.2.37rc01)
creates libpng12.so.0.1.2.37beta03)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng12.so.0.1.2.37rc01)
creates libpng12.so.0.1.2.37beta03)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -1,5 +1,5 @@
Known bugs in libpng version 1.2.37rc01
Known bugs in libpng version 1.2.37beta03
1. February 23, 2006: The custom makefiles don't build libpng with -lz.

View File

@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.2.37rc01, May 19, 2009, are
libpng versions 1.2.6, August 15, 2004, through 1.2.37beta03, May 20, 2009, are
Copyright (c) 2004, 2006-2009 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
@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
May 19, 2009
May 20, 2009

View File

@ -86,7 +86,7 @@ EXTRA_DIST= \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \
example.c libpng-1.2.37rc01.txt pngvcrd.c
example.c libpng-1.2.37beta03.txt pngvcrd.c
CLEANFILES= pngout.png libpng12.pc libpng12-config libpng.vers \
libpng.sym

View File

@ -333,7 +333,7 @@ EXTRA_DIST = \
${srcdir}/contrib/pngsuite/* \
${srcdir}/contrib/visupng/* \
$(TESTS) \
example.c libpng-1.2.37rc01.txt pngvcrd.c
example.c libpng-1.2.37beta03.txt pngvcrd.c
CLEANFILES = pngout.png libpng12.pc libpng12-config libpng.vers \
libpng.sym

14
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.2.37rc01 - May 19, 2009 (shared library 12.0)
README for libpng version 1.2.37beta03 - May 20, 2009 (shared library 12.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@ -194,11 +194,11 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng12.so.0.1.2.37rc01)
gcc, creates libpng12.so.0.1.2.37beta03)
makefile.linux => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.37rc01)
(gcc, creates libpng12.so.0.1.2.37beta03)
makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng12.so.0.1.2.37rc01,
(gcc, creates libpng12.so.0.1.2.37beta03,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@ -220,12 +220,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
(gcc, creates libpng12.so.0.1.2.37rc01)
(gcc, creates libpng12.so.0.1.2.37beta03)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng12.so.0.1.2.37rc01)
(gcc, creates libpng12.so.0.1.2.37beta03)
makefile.so9 => Solaris 9 makefile
(gcc, creates libpng12.so.0.1.2.37rc01)
(gcc, creates libpng12.so.0.1.2.37beta03)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc

View File

@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
May 19, 2009
May 20, 2009
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.2.37rc01 are Y2K compliant. It is my belief that earlier
upward through 1.2.37beta03 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer

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.62 for libpng 1.2.37rc01.
# Generated by GNU Autoconf 2.62 for libpng 1.2.37beta03.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.2.37rc01'
PACKAGE_STRING='libpng 1.2.37rc01'
PACKAGE_VERSION='1.2.37beta03'
PACKAGE_STRING='libpng 1.2.37beta03'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
ac_unique_file="pngget.c"
@ -1484,7 +1484,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.2.37rc01 to adapt to many kinds of systems.
\`configure' configures libpng 1.2.37beta03 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1554,7 +1554,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.2.37rc01:";;
short | recursive ) echo "Configuration of libpng 1.2.37beta03:";;
esac
cat <<\_ACEOF
@ -1661,7 +1661,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
libpng configure 1.2.37rc01
libpng configure 1.2.37beta03
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1675,7 +1675,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.2.37rc01, which was
It was created by libpng $as_me 1.2.37beta03, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@ -2389,7 +2389,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
VERSION='1.2.37rc01'
VERSION='1.2.37beta03'
cat >>confdefs.h <<_ACEOF
@ -2558,7 +2558,7 @@ fi
PNGLIB_VERSION=1.2.37rc01
PNGLIB_VERSION=1.2.37beta03
PNGLIB_MAJOR=1
PNGLIB_MINOR=2
PNGLIB_RELEASE=37
@ -13125,7 +13125,7 @@ exec 6>&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.2.37rc01, which was
This file was extended by libpng $as_me 1.2.37beta03, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -13178,7 +13178,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
libpng config.status 1.2.37rc01
libpng config.status 1.2.37beta03
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -18,12 +18,12 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
AC_INIT([libpng], [1.2.37rc01], [png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng], [1.2.37beta03], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
PNGLIB_VERSION=1.2.37rc01
PNGLIB_VERSION=1.2.37beta03
PNGLIB_MAJOR=1
PNGLIB_MINOR=2
PNGLIB_RELEASE=37

View File

@ -1,7 +1,9 @@
This demonstrates the use of PNG_USER_CONFIG and pngusr.h
To build a minimal read-only decoder, run
To build a minimal read-only decoder with embedded libpng and zlib, run
gather.sh # to collect needed files from pngminus, libpng, and zlib
make
If you prefer to use the shared libraries, go to contrib/pngminus
and build the png2pnm application there.

View File

@ -1,7 +1,9 @@
This demonstrates the use of PNG_USER_CONFIG and pngusr.h
To build a minimal write-only encoder, run
To build a minimal write-only decoder with embedded libpng and zlib, run
gather.sh # to collect needed files from pngminus, libpng, and zlib
make
If you prefer to use the shared libraries, go to contrib/pngminus
and build the pnm2png application there.

View File

@ -1,6 +1,7 @@
This demonstrates the use of PNG_USER_CONFIG and pngusr.h
To build a minimal read-only progressive decoder with X display, run
To build a minimal read-only progressive decoder embedded libpng and
zlib and with your system's X library, run
gather.sh # to collect needed files from gregbook, libpng, and zlib
@ -9,3 +10,5 @@ then
make
If you prefer to use the shared libraries, go to contrib/gregbook
and build the rpng2-x application there.

142
example.c
View File

@ -2,7 +2,7 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
* Last changed in libpng 1.2.37 [May 19, 2009]
* Last changed in libpng 1.2.37 [May 20, 2009]
* This file has been placed in the public domain by the authors.
* Maintained 1998-2009 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
@ -93,13 +93,13 @@ void read_png(char *file_name) /* We need to open the file */
return (ERROR);
#else no_open_file /* prototype 2 */
void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
{
png_structp png_ptr;
png_infop info_ptr;
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
#endif no_open_file /* only use one prototype! */
#endif no_open_file /* Only use one prototype! */
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
@ -177,11 +177,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
&interlace_type, int_p_NULL, int_p_NULL);
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
* transformations only work on specific types of images, and many
* are mutually exclusive.
*/
/* Set up the data transformations you want. Note that these are all
* optional. Only call them if you want/need them. Many of the
* transformations only work on specific types of images, and many
* are mutually exclusive.
*/
/* Tell libpng to strip 16 bit/color files down to 8 bits/color */
png_set_strip_16(png_ptr);
@ -230,9 +230,9 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_set_background(png_ptr, &my_background,
PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
/* Some suggestions as to how to get a screen gamma value */
/* Note that screen gamma is the display_exponent, which includes
/* Some suggestions as to how to get a screen gamma value
*
* Note that screen gamma is the display_exponent, which includes
* the CRT_exponent and any correction for viewing conditions
*/
if (/* We have a user-defined screen gamma value */)
@ -280,7 +280,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
png_colorp palette;
/* This reduces the image to the application supplied palette */
if (/* we have our own palette */)
if (/* We have our own palette */)
{
/* An array of colors to which the image should be dithered */
png_color std_color_cube[MAX_SCREEN_COLORS];
@ -377,13 +377,13 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
#else no_sparkle /* Read the image using the "rectangle" effect */
png_read_rows(png_ptr, png_bytepp_NULL, &row_pointers[y],
number_of_rows);
#endif no_sparkle /* use only one of these two methods */
#endif no_sparkle /* Use only one of these two methods */
}
/* if you want to display the image after every pass, do so here */
#endif no_single /* use only one of these two methods */
/* If you want to display the image after every pass, do so here */
#endif no_single /* Use only one of these two methods */
}
#endif no_entire /* use only one of these two methods */
#endif no_entire /* Use only one of these two methods */
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
@ -397,7 +397,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* file is already open */
/* Close the file */
fclose(fp);
/* that's it */
/* That's it */
return (OK);
}
@ -480,34 +480,35 @@ process_data(png_structp *png_ptr, png_infop *info_ptr,
info_callback(png_structp png_ptr, png_infop info)
{
/* Do any setup here, including setting any of the transformations
* mentioned in the Reading PNG files section. For now, you _must_
* call either png_start_read_image() or png_read_update_info()
* after all the transformations are set (even if you don't set
* any). You may start getting rows before png_process_data()
* returns, so this is your last chance to prepare for that.
*/
/* Do any setup here, including setting any of the transformations
* mentioned in the Reading PNG files section. For now, you _must_
* call either png_start_read_image() or png_read_update_info()
* after all the transformations are set (even if you don't set
* any). You may start getting rows before png_process_data()
* returns, so this is your last chance to prepare for that.
*/
}
row_callback(png_structp png_ptr, png_bytep new_row,
png_uint_32 row_num, int pass)
{
/*
* This function is called for every row in the image. If the
* image is interlaced, and you turned on the interlace handler,
* this function will be called for every row in every pass.
*
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
*
* The new row data pointer "new_row" may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
*
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
*/
/*
* This function is called for every row in the image. If the
* image is interlaced, and you turned on the interlace handler,
* this function will be called for every row in every pass.
*
* In this function you will receive a pointer to new row data from
* libpng called new_row that is to replace a corresponding row (of
* the same data format) in a buffer allocated by your application.
*
* The new row data pointer "new_row" may be NULL, indicating there is
* no new data to be replaced (in cases of interlace loading).
*
* If new_row is not NULL then you need to call
* png_progressive_combine_row() to replace the corresponding row as
* shown below:
*/
/* Check if row_num is in bounds. */
if ((row_num >= 0) && (row_num < height))
{
@ -522,41 +523,41 @@ row_callback(png_structp png_ptr, png_bytep new_row,
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
}
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the new row and the
* old row, as demonstrated above. You can call this function for
* NULL rows (it will just return) and for non-interlaced images
* (it just does the png_memcpy for you) if it will make the code
* easier. Thus, you can just do this for all cases:
*/
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
* may make your life easier.
*
* For the non-NULL rows of interlaced images, you must call
* png_progressive_combine_row() passing in the new row and the
* old row, as demonstrated above. You can call this function for
* NULL rows (it will just return) and for non-interlaced images
* (it just does the png_memcpy for you) if it will make the code
* easier. Thus, you can just do this for all cases:
*/
png_progressive_combine_row(png_ptr, old_row, new_row);
/* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
/* where old_row is what was displayed for previous rows. Note
* that the first pass (pass == 0 really) will completely cover
* the old row, so the rows do not have to be initialized. After
* the first pass (and only for interlaced images), you will have
* to pass the current row as new_row, and the function will combine
* the old row and the new row.
*/
}
end_callback(png_structp png_ptr, png_infop info)
{
/* This function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
/* This function is called when the whole image has been read,
* including any chunks after the image (up to and including
* the IEND). You will usually have the same info chunk as you
* had in the header, although some data may have been added
* to the comments and time fields.
*
* Most people won't do much here, perhaps setting a flag that
* marks the image as finished.
*/
}
/* Write a png file */
@ -608,6 +609,7 @@ void write_png(char *file_name /* , ... other image information ... */)
}
/* One of the following I/O initialization functions is REQUIRED */
#ifdef streams /* I/O initialization method 1 */
/* Set up the output control if you are using standard C streams */
png_init_io(png_ptr, fp);
@ -619,7 +621,7 @@ void write_png(char *file_name /* , ... other image information ... */)
png_set_write_fn(png_ptr, (void *)user_io_ptr, user_write_fn,
user_IO_flush_function);
/* where user_io_ptr is a structure you want available to the callbacks */
#endif no_streams /* only use one initialization method */
#endif no_streams /* Only use one initialization method */
#ifdef hilevel
/* This is the easy way. Use it if you already have all the
@ -771,7 +773,7 @@ void write_png(char *file_name /* , ... other image information ... */)
#ifdef entire /* Write out the entire image data in one call */
png_write_image(png_ptr, row_pointers);
/* the other way to write the image - deal with interlacing */
/* The other way to write the image - deal with interlacing */
#else no_entire /* Write out the image data by one or more scanlines */

View File

@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.37rc01 - May 19, 2009
libpng version 1.2.37beta03 - May 20, 2009
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -9,7 +9,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.2.37rc01 - May 19, 2009
libpng versions 0.97, January 1998, through 1.2.37beta03 - May 20, 2009
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -2947,13 +2947,13 @@ when the Intel assembler code was removed due to a licensing issue.
IX. (Omitted)
X. Y2K Compliance in libpng
May 19, 2009
May 20, 2009
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.2.37rc01 are Y2K compliant. It is my belief that earlier
upward through 1.2.37beta03 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "May 19, 2009"
.TH LIBPNG 3 "May 20, 2009"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37rc01
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37beta03
.SH SYNOPSIS
\fI\fB
@ -821,7 +821,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
libpng version 1.2.37rc01 - May 19, 2009
libpng version 1.2.37beta03 - May 20, 2009
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -830,7 +830,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.2.37rc01 - May 19, 2009
libpng versions 0.97, January 1998, through 1.2.37beta03 - May 20, 2009
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@ -3768,13 +3768,13 @@ when the Intel assembler code was removed due to a licensing issue.
.SH IX. (Omitted)
.SH X. Y2K Compliance in libpng
May 19, 2009
May 20, 2009
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.2.37rc01 are Y2K compliant. It is my belief that earlier
upward through 1.2.37beta03 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@ -4040,7 +4040,7 @@ the first widely used release:
1.2.36rc01 13 10236 12.so.0.36[.0]
1.0.44 10 10044 10.so.0.44[.0]
1.2.36 13 10236 12.so.0.36[.0]
1.2.37rc01 13 10237 12.so.0.37[.0]
1.2.37beta01-03 13 10237 12.so.0.37[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@ -4096,7 +4096,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.2.37rc01 - May 19, 2009:
Libpng version 1.2.37beta03 - May 20, 2009:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -4117,7 +4117,7 @@ included in the libpng distribution, the latter shall prevail.)
If you modify libpng you may insert additional notices immediately following
this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.2.37rc01, May 19, 2009, are
libpng versions 1.2.6, August 15, 2004, through 1.2.37beta03, May 20, 2009, are
Copyright (c) 2004,2006-2008 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
@ -4216,7 +4216,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
May 19, 2009
May 20, 2009
.\" end of man page

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "May 19, 2009"
.TH LIBPNGPF 3 "May 20, 2009"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37rc01
libpng \- Portable Network Graphics (PNG) Reference Library 1.2.37beta03
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "May 19, 2009"
.TH PNG 5 "May 20, 2009"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

460
png.c
View File

@ -1,9 +1,9 @@
/* png.c - location for general purpose libpng functions
*
* Last changed in libpng 1.2.34 [December 18, 2008]
* Last changed in libpng 1.2.37 [May 20, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* Copyright (c) 1998-2009 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.)
*/
@ -13,7 +13,7 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_2_37rc01 Your_png_h_is_not_version_1_2_37rc01;
typedef version_1_2_37beta03 Your_png_h_is_not_version_1_2_37beta03;
/* Version information for C files. This had better match the version
* string defined in png.h. */
@ -53,18 +53,18 @@ PNG_tRNS;
PNG_zTXt;
#ifdef PNG_READ_SUPPORTED
/* arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */
/* start of interlace block */
/* Start of interlace block */
PNG_CONST int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0};
/* offset to next interlace block */
/* Offset to next interlace block */
PNG_CONST int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1};
/* start of interlace block in the y direction */
/* Start of interlace block in the y direction */
PNG_CONST int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1};
/* offset to next interlace block in the y direction */
/* Offset to next interlace block in the y direction */
PNG_CONST int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2};
/* Height of interlace block. This is not currently used - if you need
@ -92,7 +92,8 @@ PNG_CONST int FARDATA png_pass_dsp_mask[]
void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
{
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_debug(1, "in png_set_sig_bytes");
if (num_bytes > 8)
png_error(png_ptr, "Too many bytes for PNG signature.");
@ -153,7 +154,8 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
png_uint_32 save_flags=p->flags;
png_uint_32 num_bytes;
if (png_ptr == NULL) return (NULL);
if (png_ptr == NULL)
return (NULL);
if (items > PNG_UINT_32_MAX/size)
{
png_warning (p, "Potential overflow in png_zalloc()");
@ -183,7 +185,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
return ((voidpf)ptr);
}
/* function to free memory for zlib */
/* Function to free memory for zlib */
#ifdef PNG_1_0_X
void PNGAPI
#else
@ -241,7 +243,8 @@ png_create_info_struct(png_structp png_ptr)
png_infop info_ptr;
png_debug(1, "in png_create_info_struct");
if (png_ptr == NULL) return (NULL);
if (png_ptr == NULL)
return (NULL);
#ifdef PNG_USER_MEM_SUPPORTED
info_ptr = (png_infop)png_create_struct_2(PNG_STRUCT_INFO,
png_ptr->malloc_fn, png_ptr->mem_ptr);
@ -263,7 +266,8 @@ void PNGAPI
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
{
png_infop info_ptr = NULL;
if (png_ptr == NULL) return;
if (png_ptr == NULL)
return;
png_debug(1, "in png_destroy_info_struct");
if (info_ptr_ptr != NULL)
@ -302,18 +306,19 @@ png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
{
png_infop info_ptr = *ptr_ptr;
if (info_ptr == NULL) return;
if (info_ptr == NULL)
return;
png_debug(1, "in png_info_init_3");
if (png_sizeof(png_info) > png_info_struct_size)
{
png_destroy_struct(info_ptr);
info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
*ptr_ptr = info_ptr;
}
{
png_destroy_struct(info_ptr);
info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
*ptr_ptr = info_ptr;
}
/* set everything to 0 */
/* Set everything to 0 */
png_memset(info_ptr, 0, png_sizeof(png_info));
}
@ -344,245 +349,245 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
return;
#if defined(PNG_TEXT_SUPPORTED)
/* free text item num or (if num == -1) all text items */
/* Free text item num or (if num == -1) all text items */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
if ((mask & PNG_FREE_TEXT) & info_ptr->free_me)
#else
if (mask & PNG_FREE_TEXT)
if (mask & PNG_FREE_TEXT)
#endif
{
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;
}
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;
}
}
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);
info_ptr->text = NULL;
info_ptr->num_text=0;
}
}
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);
info_ptr->text = NULL;
info_ptr->num_text=0;
}
}
#endif
#if defined(PNG_tRNS_SUPPORTED)
/* free any tRNS entry */
/* Free any tRNS entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
if ((mask & PNG_FREE_TRNS) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
if ((mask & PNG_FREE_TRNS) && (png_ptr->flags & PNG_FLAG_FREE_TRNS))
#endif
{
png_free(png_ptr, info_ptr->trans);
info_ptr->trans = NULL;
info_ptr->valid &= ~PNG_INFO_tRNS;
{
png_free(png_ptr, info_ptr->trans);
info_ptr->trans = NULL;
info_ptr->valid &= ~PNG_INFO_tRNS;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
png_ptr->flags &= ~PNG_FLAG_FREE_TRNS;
#endif
}
}
#endif
#if defined(PNG_sCAL_SUPPORTED)
/* free any sCAL entry */
/* Free any sCAL entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
if ((mask & PNG_FREE_SCAL) & info_ptr->free_me)
#else
if (mask & PNG_FREE_SCAL)
if (mask & PNG_FREE_SCAL)
#endif
{
{
#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
png_free(png_ptr, info_ptr->scal_s_width);
png_free(png_ptr, info_ptr->scal_s_height);
info_ptr->scal_s_width = NULL;
info_ptr->scal_s_height = NULL;
png_free(png_ptr, info_ptr->scal_s_width);
png_free(png_ptr, info_ptr->scal_s_height);
info_ptr->scal_s_width = NULL;
info_ptr->scal_s_height = NULL;
#endif
info_ptr->valid &= ~PNG_INFO_sCAL;
}
info_ptr->valid &= ~PNG_INFO_sCAL;
}
#endif
#if defined(PNG_pCAL_SUPPORTED)
/* free any pCAL entry */
/* Free any pCAL entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
if ((mask & PNG_FREE_PCAL) & info_ptr->free_me)
#else
if (mask & PNG_FREE_PCAL)
if (mask & PNG_FREE_PCAL)
#endif
{
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++)
{
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;
}
info_ptr->valid &= ~PNG_INFO_pCAL;
}
{
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++)
{
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;
}
info_ptr->valid &= ~PNG_INFO_pCAL;
}
#endif
#if defined(PNG_iCCP_SUPPORTED)
/* free any iCCP entry */
/* Free any iCCP entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
if ((mask & PNG_FREE_ICCP) & info_ptr->free_me)
#else
if (mask & PNG_FREE_ICCP)
if (mask & PNG_FREE_ICCP)
#endif
{
png_free(png_ptr, info_ptr->iccp_name);
png_free(png_ptr, info_ptr->iccp_profile);
info_ptr->iccp_name = NULL;
info_ptr->iccp_profile = NULL;
info_ptr->valid &= ~PNG_INFO_iCCP;
}
{
png_free(png_ptr, info_ptr->iccp_name);
png_free(png_ptr, info_ptr->iccp_profile);
info_ptr->iccp_name = NULL;
info_ptr->iccp_profile = NULL;
info_ptr->valid &= ~PNG_INFO_iCCP;
}
#endif
#if defined(PNG_sPLT_SUPPORTED)
/* free a given sPLT entry, or (if num == -1) all sPLT entries */
/* Free a given sPLT entry, or (if num == -1) all sPLT entries */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
if ((mask & PNG_FREE_SPLT) & info_ptr->free_me)
#else
if (mask & PNG_FREE_SPLT)
if (mask & PNG_FREE_SPLT)
#endif
{
if (num != -1)
{
if (info_ptr->splt_palettes)
if (num != -1)
{
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;
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;
}
}
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
#if defined(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 (png_ptr->unknown_chunk.data)
{
png_free(png_ptr, png_ptr->unknown_chunk.data);
png_ptr->unknown_chunk.data = NULL;
}
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
if ((mask & PNG_FREE_UNKN) & info_ptr->free_me)
#else
if (mask & PNG_FREE_UNKN)
if (mask & PNG_FREE_UNKN)
#endif
{
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;
}
}
else
{
int i;
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;
}
}
else
{
int i;
if (info_ptr->unknown_chunks_num)
{
for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);
if (info_ptr->unknown_chunks_num)
{
for (i = 0; i < (int)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->unknown_chunks);
info_ptr->unknown_chunks = NULL;
info_ptr->unknown_chunks_num = 0;
}
}
}
}
#endif
#if defined(PNG_hIST_SUPPORTED)
/* free any hIST entry */
/* Free any hIST entry */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
if ((mask & PNG_FREE_HIST) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
if ((mask & PNG_FREE_HIST) && (png_ptr->flags & PNG_FLAG_FREE_HIST))
#endif
{
png_free(png_ptr, info_ptr->hist);
info_ptr->hist = NULL;
info_ptr->valid &= ~PNG_INFO_hIST;
{
png_free(png_ptr, info_ptr->hist);
info_ptr->hist = NULL;
info_ptr->valid &= ~PNG_INFO_hIST;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
png_ptr->flags &= ~PNG_FLAG_FREE_HIST;
#endif
}
}
#endif
/* free any PLTE entry that was internally allocated */
/* Free any PLTE entry that was internally allocated */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
if ((mask & PNG_FREE_PLTE) & info_ptr->free_me)
#else
if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))
if ((mask & PNG_FREE_PLTE) && (png_ptr->flags & PNG_FLAG_FREE_PLTE))
#endif
{
png_zfree(png_ptr, info_ptr->palette);
info_ptr->palette = NULL;
info_ptr->valid &= ~PNG_INFO_PLTE;
{
png_zfree(png_ptr, info_ptr->palette);
info_ptr->palette = NULL;
info_ptr->valid &= ~PNG_INFO_PLTE;
#ifndef PNG_FREE_ME_SUPPORTED
png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
png_ptr->flags &= ~PNG_FLAG_FREE_PLTE;
#endif
info_ptr->num_palette = 0;
}
info_ptr->num_palette = 0;
}
#if defined(PNG_INFO_IMAGE_SUPPORTED)
/* free any image bits attached to the info structure */
/* Free any image bits attached to the info structure */
#ifdef PNG_FREE_ME_SUPPORTED
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
if ((mask & PNG_FREE_ROWS) & info_ptr->free_me)
#else
if (mask & PNG_FREE_ROWS)
if (mask & PNG_FREE_ROWS)
#endif
{
if (info_ptr->row_pointers)
{
int row;
for (row = 0; row < (int)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;
}
info_ptr->valid &= ~PNG_INFO_IDAT;
}
{
if (info_ptr->row_pointers)
{
int row;
for (row = 0; row < (int)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;
}
info_ptr->valid &= ~PNG_INFO_IDAT;
}
#endif
#ifdef PNG_FREE_ME_SUPPORTED
if (num == -1)
info_ptr->free_me &= ~mask;
info_ptr->free_me &= ~mask;
else
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
#endif
}
@ -600,9 +605,9 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list = 0;
png_free(png_ptr, png_ptr->chunk_list);
png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list = 0;
}
#endif
@ -617,7 +622,8 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
png_voidp PNGAPI
png_get_io_ptr(png_structp png_ptr)