提交 6bc53be9 编写于 作者: G Glenn Randers-Pehrson

Imported from libpng-1.4.0beta7.tar

上级 f46918d1
Libpng 1.4.0beta6 - June 2, 2006 Libpng 1.4.0beta7 - June 16, 2006
This is not intended to be a public release. It will be replaced This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version. within a few weeks by a public version or by another test version.
...@@ -9,34 +9,34 @@ Files available for download: ...@@ -9,34 +9,34 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a Source files with LF line endings (for Unix/Linux) and with a
"configure" script "configure" script
1.4.0beta6.tar.gz 1.4.0beta7.tar.gz
1.4.0beta6.tar.bz2 1.4.0beta7.tar.bz2
Source files with LF line endings (for Unix/Linux) without the Source files with LF line endings (for Unix/Linux) without the
"configure" script "configure" script
1.4.0beta6-no-config.tar.gz 1.4.0beta7-no-config.tar.gz
1.4.0beta6-no-config.tar.bz2 1.4.0beta7-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lp140b06.zip lp140b07.zip
lp140b06.tar.bz2 lp140b07.tar.bz2
Project files Project files
1.4.0beta6-project-netware.zip 1.4.0beta7-project-netware.zip
1.4.0beta6-project-wince.zip 1.4.0beta7-project-wince.zip
Other information: Other information:
1.4.0beta6-README.txt 1.4.0beta7-README.txt
1.4.0beta6-KNOWNBUGS.txt 1.4.0beta7-KNOWNBUGS.txt
1.4.0beta6-LICENSE.txt 1.4.0beta7-LICENSE.txt
1.4.0beta6-Y2K-compliance.txt 1.4.0beta7-Y2K-compliance.txt
Changes since the last public release (1.2.9): Changes since the last public release (1.2.10):
version 1.2.10beta1 [April 15, 2006] version 1.2.10beta1 [April 15, 2006]
Renamed "config.h" to "png_conf.h" and revised Makefile.am to add Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
...@@ -95,11 +95,15 @@ version 1.4.0beta2 [April 20, 2006] ...@@ -95,11 +95,15 @@ version 1.4.0beta2 [April 20, 2006]
Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def
Updated scripts/pngw32.def to comment out MMX functions. Updated scripts/pngw32.def to comment out MMX functions.
version 1.2.11beta1 [May 31, 2006]
scripts/libpng.pc.in contained "configure" style version info and would
not work with makefiles.
The shared-library makefiles were linking to libpng.so.0 instead of
libpng.so.3 compatibility as the library.
version 1.4.0beta3 [May 10, 2006] version 1.4.0beta3 [May 10, 2006]
Updated scripts/pngw32.def to comment out MMX functions. Updated scripts/pngw32.def to comment out MMX functions.
Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros. Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros.
Scripts/libpng.pc.in contained "configure" style version info and would
not work with makefiles.
Revised pngconf.h and added pngconf.h.in so makefiles and configure can Revised pngconf.h and added pngconf.h.in so makefiles and configure can
pass defines to libpng and applications. pass defines to libpng and applications.
...@@ -107,10 +111,48 @@ version 1.4.0beta4 [May 11, 2006] ...@@ -107,10 +111,48 @@ version 1.4.0beta4 [May 11, 2006]
Revised configure.ac, Makefile.am, and many of the makefiles to write Revised configure.ac, Makefile.am, and many of the makefiles to write
their defines in pngconf.h. their defines in pngconf.h.
version 1.4.0beta5 [June 2, 2006] version 1.4.0beta5 [June 16, 2006]
Added a missing semicolon in Makefile.am and Makefile.in Added a missing semicolon in Makefile.am and Makefile.in
Deleted extraneous square brackets from configure.ac Deleted extraneous square brackets from configure.ac
version 1.2.11beta2 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb))
version 1.4.0beta6 [June 2, 2006]
Changed sonum from 0 to 1.
Removed unused prototype for png_check_sig() from png.h
version 1.2.11beta3 [June 5, 2006]
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
Removed the accidental leftover Makefile.in~ (Cosmin).
Avoided potential buffer overflow and optimized buffer in
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
Removed the include directories and libraries from CFLAGS and LDFLAGS
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
version 1.2.11beta4 [June 6, 2006]
Allow zero-length IDAT chunks after the entire zlib datastream, but not
after another intervening chunk type.
version 1.2.11rc2 [June 14, 2006]
Added prototypes for PNG_INCH_CONVERSIONS functions to png.h
Revised INSTALL and autogen.sh
Fixed typo in several makefiles (-W1 should be -Wl)
version 1.2.11rc3 [June 16, 2006]
Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
reading out of bounds.
version 1.4.0beta7 [June 16, 2006]
Exported png_write_sig (Cosmin).
Optimized buffer in png_handle_cHRM() (Cosmin).
Set pHYs = 2835 x 2835 pixels per meter, and added
sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin).
Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error().
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement https://lists.sourceforge.net/lists/listinfo/png-mng-implement
......
...@@ -1564,17 +1564,6 @@ version 1.2.10rc3 [April 20, 2006] ...@@ -1564,17 +1564,6 @@ version 1.2.10rc3 [April 20, 2006]
version 1.2.10 [April 23, 2006] version 1.2.10 [April 23, 2006]
Reverted configure to "rc2" state. Reverted configure to "rc2" state.
version 1.2.11beta1 [May 31, 2006]
scripts/libpng.pc.in contained "configure" style version info and would
not work with makefiles.
The shared-library makefiles were linking to libpng.so.0 instead of
libpng.so.3 compatibility as the library.
version 1.2.11beta2 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb))
version 1.4.0beta1 [April 20, 2006] version 1.4.0beta1 [April 20, 2006]
Enabled iTXt support (changes png_struct, thus requires so-number change). Enabled iTXt support (changes png_struct, thus requires so-number change).
Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
...@@ -1608,12 +1597,56 @@ version 1.4.0beta5 [May 31, 2006] ...@@ -1608,12 +1597,56 @@ version 1.4.0beta5 [May 31, 2006]
Added a missing semicolon in Makefile.am and Makefile.in Added a missing semicolon in Makefile.am and Makefile.in
Deleted extraneous square brackets from configure.ac Deleted extraneous square brackets from configure.ac
version 1.2.11beta1 [May 31, 2006]
scripts/libpng.pc.in contained "configure" style version info and would
not work with makefiles.
The shared-library makefiles were linking to libpng.so.0 instead of
libpng.so.3 compatibility as the library.
version 1.2.11beta2 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
version 1.4.0beta6 [June 2, 2006] version 1.4.0beta6 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow. buffer overflow.
Changed sonum from 0 to 1. Changed sonum from 0 to 1.
Removed unused prototype for png_check_sig() from png.h Removed unused prototype for png_check_sig() from png.h
version 1.2.11beta3 [June 5, 2006]
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
Removed the accidental leftover Makefile.in~ (Cosmin).
Avoided potential buffer overflow and optimized buffer in
png_write_sCAL(), png_write_sCAL_s() (Cosmin).
Removed the include directories and libraries from CFLAGS and LDFLAGS
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
version 1.2.11beta4 [June 6, 2006]
Allow zero-length IDAT chunks after the entire zlib datastream, but not
after another intervening chunk type.
version 1.2.11rc1 [June 13, 2006]
Deleted extraneous square brackets from [config.h] in configure.ac
version 1.2.11rc2 [June 14, 2006]
Added prototypes for PNG_INCH_CONVERSIONS functions to png.h
Revised INSTALL and autogen.sh
Fixed typo in several makefiles (-W1 should be -Wl)
version 1.2.11rc3 [June 16, 2006]
Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
reading out of bounds.
version 1.4.0beta7 [June 16, 2006]
Exported png_write_sig (Cosmin).
Optimized buffer in png_handle_cHRM() (Cosmin).
Set pHYs = 2835 x 2835 pixels per meter, and added
sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin).
Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error().
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
Added "(unsigned long)" typecast on png_uint_32 variables in printf lists.
version 1.4.0betaN [future] version 1.4.0betaN [future]
Cleaned up error and warning messages. Cleaned up error and warning messages.
Implemented sTER chunk. Implemented sTER chunk.
......
Installing libpng version 1.4.0beta6 - June 2, 2006 Installing libpng version 1.4.0beta7 - June 16, 2006
On Unix/Linux and similar systems, you can simply type On Unix/Linux and similar systems, you can simply type
./autogen.sh
./configure [--prefix=$HOME] ./configure [--prefix=$HOME]
make check make check
make install make install
and ignore the rest of this document. and ignore the rest of this document.
Or you can use one of the custom-built makefiles in the If configure does not work on your system and you have a reasonably
up-to-date set of tools, running ./autogen.sh before running ./configure
may fix the problem. You can also run the individual commands in
autogen.sh with the --force option, if supported by your version of
the tools. If you run 'libtoolize --force', though, this will replace
the distributed, patched, version of ltmain.sh with an unpatched version
and your shared library builds may fail to produce libraries with the
correct version numbers.
Instead, you can use one of the custom-built makefiles in the
"scripts" directory "scripts" directory
cp scripts/makefile.system makefile cp scripts/makefile.system makefile
...@@ -29,7 +37,7 @@ to have access to the zlib.h and zconf.h include files that ...@@ -29,7 +37,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed. correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they You can rename the directories that you downloaded (they
might be called "libpng-1.4.0beta6" or "lpng109" and "zlib-1.2.1" might be called "libpng-1.4.0beta7" or "lpng109" and "zlib-1.2.1"
or "zlib121") so that you have directories called "zlib" and "libpng". or "zlib121") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this: Your directory structure should look like this:
...@@ -85,11 +93,11 @@ include ...@@ -85,11 +93,11 @@ include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning, makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng14.so.1.1.4.0beta6) gcc, creates libpng14.so.1.1.4.0beta7)
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.1.1.4.0beta6) (gcc, creates libpng14.so.1.1.4.0beta7)
makefile.gcmmx => Linux/ELF makefile makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng14.so.1.1.4.0beta6, (gcc, creates libpng14.so.1.1.4.0beta7,
uses assembler code tuned for Intel MMX platform) uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with makefile.knr => Archaic UNIX Makefile that converts files with
...@@ -112,12 +120,12 @@ include ...@@ -112,12 +120,12 @@ include
makefile.openbsd => OpenBSD makefile makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.sggcc => Silicon Graphics (gcc, makefile.sggcc => Silicon Graphics (gcc,
creates libpng14.so.1.1.4.0beta6) creates libpng14.so.1.1.4.0beta7)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile (gcc, makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng14.so.1.1.4.0beta6) creates libpng14.so.1.1.4.0beta7)
makefile.so9 => Solaris 9 makefile (gcc, makefile.so9 => Solaris 9 makefile (gcc,
creates libpng14.so.1.1.4.0beta6) creates libpng14.so.1.1.4.0beta7)
makefile.32sunu => Sun Ultra 32-bit makefile makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
......
Known bugs in libpng version 1.4.0beta6 Known bugs in libpng version 1.4.0beta7
1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
reading interlaced PNG files, when assembler code is enabled but running reading interlaced PNG files, when assembler code is enabled but running
......
...@@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: ...@@ -8,7 +8,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following If you modify libpng you may insert additional notices immediately following
this sentence. this sentence.
libpng versions 1.2.6, August 15, 2004, through 1.4.0beta6, June 2, 2006, are libpng versions 1.2.6, August 15, 2004, through 1.4.0beta7, June 16, 2006, are
Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5 distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors with the following individual added to the list of Contributing Authors
...@@ -106,4 +106,4 @@ certification mark of the Open Source Initiative. ...@@ -106,4 +106,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
June 2, 2006 June 16, 2006
README for libpng version 1.4.0beta6 - June 2, 2006 (shared library 14.0) README for libpng version 1.4.0beta7 - June 16, 2006 (shared library 14.0)
See the note about version numbers near the top of png.h See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng. See INSTALL for instructions on how to install libpng.
...@@ -190,11 +190,11 @@ Files in this distribution: ...@@ -190,11 +190,11 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning, makefile.elf => Linux/ELF makefile symbol versioning,
gcc, creates libpng14.so.1.1.4.0beta6) gcc, creates libpng14.so.1.1.4.0beta7)
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile
(gcc, creates libpng14.so.1.1.4.0beta6) (gcc, creates libpng14.so.1.1.4.0beta7)
makefile.gcmmx => Linux/ELF makefile makefile.gcmmx => Linux/ELF makefile
(gcc, creates libpng14.so.1.1.4.0beta6, (gcc, creates libpng14.so.1.1.4.0beta7,
uses assembler code tuned for Intel MMX platform) uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with makefile.knr => Archaic UNIX Makefile that converts files with
...@@ -216,12 +216,12 @@ Files in this distribution: ...@@ -216,12 +216,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib) makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics makefile.sggcc => Silicon Graphics
(gcc, creates libpng14.so.1.1.4.0beta6) (gcc, creates libpng14.so.1.1.4.0beta7)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile makefile.solaris => Solaris 2.X makefile
(gcc, creates libpng14.so.1.1.4.0beta6) (gcc, creates libpng14.so.1.1.4.0beta7)
makefile.so9 => Solaris 9 makefile makefile.so9 => Solaris 9 makefile
(gcc, creates libpng14.so.1.1.4.0beta6) (gcc, creates libpng14.so.1.1.4.0beta7)
makefile.32sunu => Sun Ultra 32-bit makefile makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
......
Y2K compliance in libpng: Y2K compliance in libpng:
========================= =========================
June 2, 2006 June 16, 2006
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.4.0beta6 are Y2K compliant. It is my belief that earlier upward through 1.4.0beta7 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer Libpng only has three year fields. One is a 2-byte unsigned integer
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# #
# WARNING: if you run this you will change the versions # WARNING: if you run this you will change the versions
# of the tools which are used and, maybe, required! # of the tools which are used and, maybe, required!
touch Makefile.am configure.ac
{ {
echo "running libtoolize" >&2 echo "running libtoolize" >&2
libtoolize --copy --automake libtoolize --copy --automake
......
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for libpng 1.4.0beta6. # Generated by GNU Autoconf 2.59 for libpng 1.4.0beta7.
# #
# Report bugs to <png-mng-implement@lists.sourceforge.net>. # Report bugs to <png-mng-implement@lists.sourceforge.net>.
# #
...@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} ...@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='libpng' PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng' PACKAGE_TARNAME='libpng'
PACKAGE_VERSION='1.4.0beta6' PACKAGE_VERSION='1.4.0beta7'
PACKAGE_STRING='libpng 1.4.0beta6' PACKAGE_STRING='libpng 1.4.0beta7'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net' PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
ac_unique_file="pngget.c" ac_unique_file="pngget.c"
...@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then ...@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # 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. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures libpng 1.4.0beta6 to adapt to many kinds of systems. \`configure' configures libpng 1.4.0beta7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
...@@ -1020,7 +1020,7 @@ fi ...@@ -1020,7 +1020,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of libpng 1.4.0beta6:";; short | recursive ) echo "Configuration of libpng 1.4.0beta7:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
...@@ -1167,7 +1167,7 @@ fi ...@@ -1167,7 +1167,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
libpng configure 1.4.0beta6 libpng configure 1.4.0beta7
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
...@@ -1181,7 +1181,7 @@ cat >&5 <<_ACEOF ...@@ -1181,7 +1181,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by libpng $as_me 1.4.0beta6, which was It was created by libpng $as_me 1.4.0beta7, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
...@@ -1824,7 +1824,7 @@ fi ...@@ -1824,7 +1824,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='libpng' PACKAGE='libpng'
VERSION='1.4.0beta6' VERSION='1.4.0beta7'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
...@@ -1979,7 +1979,7 @@ fi ...@@ -1979,7 +1979,7 @@ fi
PNGLIB_VERSION=1.4.0beta6 PNGLIB_VERSION=1.4.0beta7
PNGLIB_MAJOR=14 PNGLIB_MAJOR=14
PNGLIB_MINOR=0 PNGLIB_MINOR=0
...@@ -20683,7 +20683,7 @@ _ASBOX ...@@ -20683,7 +20683,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by libpng $as_me 1.4.0beta6, which was This file was extended by libpng $as_me 1.4.0beta7, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
...@@ -20746,7 +20746,7 @@ _ACEOF ...@@ -20746,7 +20746,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
libpng config.status 1.4.0beta6 libpng config.status 1.4.0beta7
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
......
...@@ -18,12 +18,12 @@ AC_PREREQ(2.59) ...@@ -18,12 +18,12 @@ AC_PREREQ(2.59)
dnl Version number stuff here: dnl Version number stuff here:
AC_INIT([libpng], [1.4.0beta6], [png-mng-implement@lists.sourceforge.net]) AC_INIT([libpng], [1.4.0beta7], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake dnl stop configure from automagically running automake
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
PNGLIB_VERSION=1.4.0beta6 PNGLIB_VERSION=1.4.0beta7
PNGLIB_MAJOR=14 PNGLIB_MAJOR=14
PNGLIB_MINOR=0 PNGLIB_MINOR=0
......
#!/bin/sh
# -- grayscale # -- grayscale
./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm ./png2pnm -noraw ../pngsuite/basn0g01.png basn0g01.pgm
./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm ./png2pnm -noraw ../pngsuite/basn0g02.png basn0g02.pgm
......
#!/bin/sh
make -f makefile.std make -f makefile.std
sh png2pnm.sh sh png2pnm.sh
sh pnm2png.sh sh pnm2png.sh
......
#!/bin/sh
# -- grayscale # -- grayscale
./pnm2png basn0g01.pgm basn0g01.png ./pnm2png basn0g01.pgm basn0g01.png
./pnm2png basn0g02.pgm basn0g02.png ./pnm2png basn0g02.pgm basn0g02.png
......
此差异已折叠。
libpng.txt - A description on how to use and modify libpng libpng.txt - A description on how to use and modify libpng
libpng version 1.4.0beta6 - June 2, 2006 libpng version 1.4.0beta7 - June 16, 2006
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2005 Glenn Randers-Pehrson Copyright (c) 1998-2005 Glenn Randers-Pehrson
...@@ -2915,13 +2915,13 @@ application: ...@@ -2915,13 +2915,13 @@ application:
IX. Y2K Compliance in libpng IX. Y2K Compliance in libpng
June 2, 2006 June 16, 2006
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.4.0beta6 are Y2K compliant. It is my belief that earlier upward through 1.4.0beta7 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that Libpng only has three year fields. One is a 2-byte unsigned integer that
......
.TH LIBPNGPF 3 "June 2, 2006" .TH LIBPNGPF 3 "June 16, 2006"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta6 libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0beta7
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB#include <png.h>\fP \fB#include <png.h>\fP
\fI\fB
\fI\fB
\fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_build_gamma_table (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP \fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP \fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
\fI\fB
\fI\fB
\fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP \fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP \fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP \fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP
\fI\fB
\fI\fB
\fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP \fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP \fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP \fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP
\fI\fB
\fI\fB
\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP \fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBpng_charp png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP \fBpng_charp png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_charp \fP\fIchunkdata\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP \fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP \fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP \fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_values\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP \fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP \fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP \fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP \fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP \fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP \fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP \fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP \fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP \fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP \fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP \fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP \fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP \fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP \fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP \fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP \fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP \fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP \fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP \fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP \fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP \fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP \fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP \fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP \fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP \fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP \fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP \fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP \fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP \fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext\fP\fB);\fP \fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP \fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP \fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP \fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP \fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP \fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP \fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP \fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP
\fBvoid png_write_sig (png_structp \fIpng_ptr\fP\fB);\fP \fI\fB
\fI\fB
\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP \fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP \fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP \fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP \fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP \fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP \fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP \fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP \fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
\fI\fB
\fI\fB
\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP \fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
\fI\fB \fI\fB
\fI\fB
.SH DESCRIPTION .SH DESCRIPTION
The functions listed above are used privately by libpng The functions listed above are used privately by libpng
and are not recommended for use by applications. They are and are not recommended for use by applications. They are
......
#! /bin/sh
# ltmain.sh - Provide generalized library-building support services. # ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure. # NOTE: Changing this file will not affect anything until you rerun configure.
# #
......
.TH PNG 5 "June 2, 2006" .TH PNG 5 "June 16, 2006"
.SH NAME .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "pngintrn.h" #include "pngintrn.h"
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_0beta6 Your_png_h_is_not_version_1_4_0beta6; typedef version_1_4_0beta7 Your_png_h_is_not_version_1_4_0beta7;
/* Version information for C files. This had better match the version /* Version information for C files. This had better match the version
* string defined in png.h. */ * string defined in png.h. */
...@@ -637,7 +637,7 @@ png_charp PNGAPI ...@@ -637,7 +637,7 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr) png_get_copyright(png_structp png_ptr)
{ {
if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */ if (&png_ptr != NULL) /* silence compiler warning about unused png_ptr */
return ((png_charp) "\n libpng version 1.4.0beta6 - June 2, 2006\n\ return ((png_charp) "\n libpng version 1.4.0beta7 - June 16, 2006\n\
Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\ Copyright (c) 1998-2006 Glenn Randers-Pehrson\n\
Copyright (c) 1996-1997 Andreas Dilger\n\ Copyright (c) 1996-1997 Andreas Dilger\n\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n"); Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
......
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.4.0beta6 - June 2, 2006 * libpng version 1.4.0beta7 - June 16, 2006
* Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.4.0beta6 - June 2, 2006: Glenn * libpng versions 0.97, January 1998, through 1.4.0beta7 - June 16, 2006: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
...@@ -120,6 +120,8 @@ ...@@ -120,6 +120,8 @@
* 1.2.10rc1-2 13 10210 12.so.0.10[.0] * 1.2.10rc1-2 13 10210 12.so.0.10[.0]
* 1.2.10 13 10210 12.so.0.10[.0] * 1.2.10 13 10210 12.so.0.10[.0]
* 1.4.0beta1-5 14 10400 14.so.0.0[.0] * 1.4.0beta1-5 14 10400 14.so.0.0[.0]
* 1.2.11beta1-4 13 10210 12.so.0.10[.0]
* 1.4.0beta7 14 10400 14.so.0.0[.0]
* *
* Henceforth the source version will match the shared-library major * Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be * and minor numbers; the shared-library major version number will be
...@@ -149,7 +151,7 @@ ...@@ -149,7 +151,7 @@
* If you modify libpng you may insert additional notices immediately following * If you modify libpng you may insert additional notices immediately following
* this sentence. * this sentence.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.4.0beta6, June 2, 2006, are * libpng versions 1.2.6, August 15, 2004, through 1.4.0beta7, June 16, 2006, are
* Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are * Copyright (c) 2004, 2006 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5 * distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors: * with the following individual added to the list of Contributing Authors:
...@@ -261,13 +263,13 @@ ...@@ -261,13 +263,13 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* June 2, 2006 * June 16, 2006
* *
* Since the PNG Development group is an ad-hoc body, we can't make * Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration. * an official declaration.
* *
* This is your unofficial assurance that libpng from version 0.71 and * This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.4.0beta6 are Y2K compliant. It is my belief that earlier * upward through 1.4.0beta7 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant. * versions were also Y2K compliant.
* *
* Libpng only has three year fields. One is a 2-byte unsigned integer * Libpng only has three year fields. One is a 2-byte unsigned integer
...@@ -323,9 +325,9 @@ ...@@ -323,9 +325,9 @@
*/ */
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.4.0beta6" #define PNG_LIBPNG_VER_STRING "1.4.0beta7"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.4.0beta6 - June 2, 2006 (header)\n" " libpng version 1.4.0beta7 - June 16, 2006 (header)\n"
#define PNG_LIBPNG_VER_SONUM 1 #define PNG_LIBPNG_VER_SONUM 1
#define PNG_LIBPNG_VER_DLLNUM 14 #define PNG_LIBPNG_VER_DLLNUM 14
...@@ -337,7 +339,7 @@ ...@@ -337,7 +339,7 @@
/* This should match the numeric part of the final component of /* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */ * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
#define PNG_LIBPNG_VER_BUILD 6 #define PNG_LIBPNG_VER_BUILD 7
/* Release Status */ /* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1 #define PNG_LIBPNG_BUILD_ALPHA 1
...@@ -1361,7 +1363,7 @@ struct png_struct_def ...@@ -1361,7 +1363,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h /* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number. * do not agree upon the version number.
*/ */
typedef png_structp version_1_4_0beta6; typedef png_structp version_1_4_0beta7;
typedef png_struct FAR * FAR * png_structpp; typedef png_struct FAR * FAR * png_structpp;
...@@ -1423,6 +1425,9 @@ extern PNG_EXPORT(png_structp,png_create_write_struct_2) ...@@ -1423,6 +1425,9 @@ extern PNG_EXPORT(png_structp,png_create_write_struct_2)
png_malloc_ptr malloc_fn, png_free_ptr free_fn)); png_malloc_ptr malloc_fn, png_free_ptr free_fn));
#endif #endif
/* Write the PNG file signature. */
extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr));
/* Write a PNG chunk - size, type, (optional) data, CRC. */ /* Write a PNG chunk - size, type, (optional) data, CRC. */
extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
png_bytep chunk_name, png_bytep data, png_size_t length)); png_bytep chunk_name, png_bytep data, png_size_t length));
...@@ -1979,6 +1984,20 @@ extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr, ...@@ -1979,6 +1984,20 @@ extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr, extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
png_const_charp warning_message)); png_const_charp warning_message));
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
/* Benign error in libpng. Can continue, but may have a problem.
* User can choose whether to handle as a fatal error or as a warning. */
extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr,
png_const_charp warning_message));
/* Same, chunk name is prepended to message. */
extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr,
png_const_charp warning_message));
extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
png_ptr, int allowed));
#endif
/* The png_set_<chunk> functions are for storing values in the png_info_struct. /* The png_set_<chunk> functions are for storing values in the png_info_struct.
* Similarly, the png_get_<chunk> calls are used to read values from the * Similarly, the png_get_<chunk> calls are used to read values from the
* png_info_struct, either storing the parameters in the passed variables, or * png_info_struct, either storing the parameters in the passed variables, or
...@@ -2502,6 +2521,28 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp ...@@ -2502,6 +2521,28 @@ extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
png_ptr)); png_ptr));
#endif #endif
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr,
png_infop info_ptr));
#if defined(PNG_pHYs_SUPPORTED)
PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif /* PNG_pHYs_SUPPORTED */
#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
/* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */ /* Maintainer: Put new public prototypes here ^, in libpng.3, and project defs */
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED #ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
......
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.4.0beta6 - June 2, 2006 * libpng version 1.4.0beta7 - June 16, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
/* Makefile-supplied defines go here: */ /* Makefile-supplied defines go here: */
/* End of Makefile-supplied defines. */ /* End of Makefile-supplied defines. */
#ifndef PNG_NO_LIMITS_H
#include <limits.h>
#endif
/* Added at libpng-1.2.9 */ /* Added at libpng-1.2.9 */
/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ /* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
...@@ -108,6 +112,17 @@ ...@@ -108,6 +112,17 @@
# define PNG_WRITE_SUPPORTED # define PNG_WRITE_SUPPORTED
#endif #endif
/* Enabled in 1.4.0. */
#ifdef PNG_ALLOW_BENIGN_ERRORS
# define png_benign_error png_warning
# define png_chunk_benign_error png_chunk_warning
#else
# ifndef PNG_BENIGN_ERRORS_SUPPORTED
# define png_benign_error png_error
# define png_chunk_benign_error png_chunk_error
# endif
#endif
/* Enabled by default in 1.2.0. You can disable this if you don't need to /* Enabled by default in 1.2.0. You can disable this if you don't need to
support PNGs that are embedded in MNG datastreams */ support PNGs that are embedded in MNG datastreams */
#if !defined(PNG_NO_MNG_FEATURES) #if !defined(PNG_NO_MNG_FEATURES)
...@@ -977,8 +992,13 @@ ...@@ -977,8 +992,13 @@
* want to have unsigned int for png_uint_32 instead of unsigned long. * want to have unsigned int for png_uint_32 instead of unsigned long.
*/ */
#if defined(INT_MAX) && (INT_MAX > 0x7ffffffeL)
typedef unsigned int png_uint_32;
typedef int png_int_32;
#else
typedef unsigned long png_uint_32; typedef unsigned long png_uint_32;
typedef long png_int_32; typedef long png_int_32;
#endif
typedef unsigned short png_uint_16; typedef unsigned short png_uint_16;
typedef short png_int_16; typedef short png_int_16;
typedef unsigned char png_byte; typedef unsigned char png_byte;
......
...@@ -106,6 +106,17 @@ png_warning(png_structp png_ptr, png_const_charp warning_message) ...@@ -106,6 +106,17 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
png_default_warning(png_ptr, warning_message+offset); png_default_warning(png_ptr, warning_message+offset);
} }
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_warning(png_ptr, error_message);
else
png_error(png_ptr, error_message);
}
#endif
/* These utilities are used internally to build an error message that relates /* These utilities are used internally to build an error message that relates
* to the current chunk. The chunk name comes from png_ptr->chunk_name, * to the current chunk. The chunk name comes from png_ptr->chunk_name,
* this is used to prefix the message. The message is limited in length * this is used to prefix the message. The message is limited in length
...@@ -171,6 +182,17 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message) ...@@ -171,6 +182,17 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
png_warning(png_ptr, msg); png_warning(png_ptr, msg);
} }
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
void PNGAPI
png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
png_chunk_warning(png_ptr, error_message);
else
png_chunk_error(png_ptr, error_message);
}
#endif
/* This is the default error handling function. Note that replacements for /* This is the default error handling function. Note that replacements for
* this function MUST NOT RETURN, or the program will likely crash. This * this function MUST NOT RETURN, or the program will likely crash. This
* function is used by default, or if the program supplies NULL for the * function is used by default, or if the program supplies NULL for the
......
/* pngintrn.h - internal header file for libpng /* pngintrn.h - internal header file for libpng
* *
* libpng version 1.4.0beta6 - June 2, 2006 * libpng version 1.4.0beta7 - June 16, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2005 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/ */
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
#define PNG_HAVE_IHDR 0x01 #define PNG_HAVE_IHDR 0x01
#define PNG_HAVE_PLTE 0x02 #define PNG_HAVE_PLTE 0x02
#define PNG_HAVE_IDAT 0x04 #define PNG_HAVE_IDAT 0x04
#define PNG_AFTER_IDAT 0x08 #define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
#define PNG_HAVE_IEND 0x10 #define PNG_HAVE_IEND 0x10
#define PNG_HAVE_gAMA 0x20 #define PNG_HAVE_gAMA 0x20
#define PNG_HAVE_cHRM 0x40 #define PNG_HAVE_cHRM 0x40
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400 #define PNG_WROTE_INFO_BEFORE_PLTE 0x400
#define PNG_BACKGROUND_IS_GRAY 0x800 #define PNG_BACKGROUND_IS_GRAY 0x800
#define PNG_HAVE_PNG_SIGNATURE 0x1000 #define PNG_HAVE_PNG_SIGNATURE 0x1000
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
/* flags for the transformations the PNG library does on the image data */ /* flags for the transformations the PNG library does on the image data */
#define PNG_BGR 0x0001 #define PNG_BGR 0x0001
...@@ -185,7 +186,7 @@ ...@@ -185,7 +186,7 @@
#define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L #define PNG_FLAG_MALLOC_NULL_MEM_OK 0x100000L
#define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */ #define PNG_FLAG_ADD_ALPHA 0x200000L /* Added to libpng-1.2.8 */
#define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */ #define PNG_FLAG_STRIP_ALPHA 0x400000L /* Added to libpng-1.2.8 */
/* 0x800000L unused */ #define PNG_FLAG_BENIGN_ERRORS_WARN 0x800000L /* Added to libpng-1.4.0 */
/* 0x1000000L unused */ /* 0x1000000L unused */
/* 0x2000000L unused */ /* 0x2000000L unused */
/* 0x4000000L unused */ /* 0x4000000L unused */
...@@ -389,9 +390,6 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr, ...@@ -389,9 +390,6 @@ PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr)); PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
#endif #endif
/* simple function to write the signature */
PNG_EXTERN void png_write_sig PNGARG((png_structp png_ptr));
/* write various chunks */ /* write various chunks */
/* Write the IHDR chunk, and update the png_struct with the necessary /* Write the IHDR chunk, and update the png_struct with the necessary
......
/* pngpread.c - read a png file in push mode /* pngpread.c - read a png file in push mode
* *
* Last changed in libpng 1.4.0 April 20, 2006 * Last changed in libpng 1.2.11 June 7, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2004 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/ */
...@@ -214,6 +214,10 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) ...@@ -214,6 +214,10 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
} }
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
if(png_ptr->mode & PNG_AFTER_IDAT)
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
{ {
if (png_ptr->push_length + 4 > png_ptr->buffer_size) if (png_ptr->push_length + 4 > png_ptr->buffer_size)
...@@ -281,11 +285,12 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr) ...@@ -281,11 +285,12 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
if (png_ptr->mode & PNG_HAVE_IDAT) if (png_ptr->mode & PNG_HAVE_IDAT)
{ {
if (!(png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
if (png_ptr->push_length == 0) if (png_ptr->push_length == 0)
return; return;
if (png_ptr->mode & PNG_AFTER_IDAT) if (png_ptr->mode & PNG_AFTER_IDAT)
png_error(png_ptr, "Too many IDAT's found"); png_benign_error(png_ptr, "Too many IDAT's found");
} }
png_ptr->idat_size = png_ptr->push_length; png_ptr->idat_size = png_ptr->push_length;
...@@ -746,7 +751,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, ...@@ -746,7 +751,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
int ret; int ret;
if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length) if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length)
png_error(png_ptr, "Extra compression data"); png_benign_error(png_ptr, "Extra compression data");
png_ptr->zstream.next_in = buffer; png_ptr->zstream.next_in = buffer;
png_ptr->zstream.avail_in = (uInt)buffer_length; png_ptr->zstream.avail_in = (uInt)buffer_length;
...@@ -758,7 +763,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer, ...@@ -758,7 +763,7 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
if (ret == Z_STREAM_END) if (ret == Z_STREAM_END)
{ {
if (png_ptr->zstream.avail_in) if (png_ptr->zstream.avail_in)
png_error(png_ptr, "Extra compressed data"); png_benign_error(png_ptr, "Extra compressed data");
if (!(png_ptr->zstream.avail_out)) if (!(png_ptr->zstream.avail_out))
{ {
png_push_process_row(png_ptr); png_push_process_row(png_ptr);
......
/* pngread.c - read a PNG file /* pngread.c - read a PNG file
* *
* Last changed in libpng 1.4.0 April 20, 2006 * Last changed in libpng 1.2.11 June 7, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -351,11 +351,15 @@ png_read_info(png_structp png_ptr, png_infop info_ptr) ...@@ -351,11 +351,15 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_crc_read(png_ptr, png_ptr->chunk_name, 4); png_crc_read(png_ptr, png_ptr->chunk_name, 4);
png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name, png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name,
length); (unsigned long) length);
/* This should be a binary subdivision search or a hash for /* This should be a binary subdivision search or a hash for
* matching the chunk name rather than a linear search. * matching the chunk name rather than a linear search.
*/ */
if (!png_memcmp(png_ptr->chunk_name, (png_bytep)png_IDAT, 4))
if(png_ptr->mode & PNG_AFTER_IDAT)
png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4)) if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
png_handle_IHDR(png_ptr, info_ptr, length); png_handle_IHDR(png_ptr, info_ptr, length);
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4)) else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
...@@ -506,7 +510,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) ...@@ -506,7 +510,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
#endif #endif
int ret; int ret;
png_debug2(1, "in png_read_row (row %lu, pass %d)\n", png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
png_ptr->row_number, png_ptr->pass); (unsigned long) png_ptr->row_number, png_ptr->pass);
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT)) if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr); png_read_start_row(png_ptr);
if (png_ptr->row_number == 0 && png_ptr->pass == 0) if (png_ptr->row_number == 0 && png_ptr->pass == 0)
...@@ -655,7 +659,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row) ...@@ -655,7 +659,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{ {
if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in || if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
png_ptr->idat_size) png_ptr->idat_size)
png_error(png_ptr, "Extra compressed data"); png_benign_error(png_ptr, "Extra compressed data");
png_ptr->mode |= PNG_AFTER_IDAT; png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break; break;
...@@ -928,11 +932,9 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) ...@@ -928,11 +932,9 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
{ {
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
{ {
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
png_error(png_ptr, "Too many IDAT's found"); png_benign_error(png_ptr, "Too many IDAT's found");
} }
else
png_ptr->mode |= PNG_AFTER_IDAT;
png_handle_unknown(png_ptr, info_ptr, length); png_handle_unknown(png_ptr, info_ptr, length);
if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
png_ptr->mode |= PNG_HAVE_PLTE; png_ptr->mode |= PNG_HAVE_PLTE;
...@@ -943,8 +945,8 @@ png_read_end(png_structp png_ptr, png_infop info_ptr) ...@@ -943,8 +945,8 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
/* Zero length IDATs are legal after the last IDAT has been /* Zero length IDATs are legal after the last IDAT has been
* read, but not after other chunks have been read. * read, but not after other chunks have been read.
*/ */
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT) if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
png_error(png_ptr, "Too many IDAT's found"); png_benign_error(png_ptr, "Too many IDAT's found");
png_crc_finish(png_ptr, length); png_crc_finish(png_ptr, length);
} }
else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4)) else if (!png_memcmp(png_ptr->chunk_name, png_PLTE, 4))
......
/* pngrtran.c - transforms the data in a row for PNG readers /* pngrtran.c - transforms the data in a row for PNG readers
* *
* Last changed in libpng 1.4.0 April 20, 2006 * Last changed in libpng 1.4.0 June 15, 2006
* For conditions of distribution and use, see copyright notice in png.h * For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2006 Glenn Randers-Pehrson * Copyright (c) 1998-2006 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
...@@ -1206,8 +1206,8 @@ png_do_read_transformations(png_structp png_ptr) ...@@ -1206,8 +1206,8 @@ png_do_read_transformations(png_structp png_ptr)
#ifndef PNG_NO_STDIO #ifndef PNG_NO_STDIO
char msg[50]; char msg[50];
png_sprintf(msg, "NULL row buffer for row %ld, pass %d", png_sprintf(msg, "NULL row buffer for row %lu, pass %d",
png_ptr->row_number, png_ptr->pass); (unsigned long) png_ptr->row_number, png_ptr->pass);
png_error(png_ptr, msg); png_error(png_ptr, msg);
#else #else
png_error(png_ptr, "NULL row buffer"); png_error(png_ptr, "NULL row buffer");
...@@ -3922,7 +3922,7 @@ png_do_dither(png_row_infop row_info, png_bytep row, ...@@ -3922,7 +3922,7 @@ png_do_dither(png_row_infop row_info, png_bytep row,
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
#if defined(PNG_READ_GAMMA_SUPPORTED) #if defined(PNG_READ_GAMMA_SUPPORTED)
static int png_gamma_shift[] = static int png_gamma_shift[] =
{0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0}; {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x000};
/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit /* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
* tables, we don't make a full table if we are reducing to 8-bit in * tables, we don't make a full table if we are reducing to 8-bit in
......
...@@ -102,7 +102,8 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip) ...@@ -102,7 +102,8 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
} }
else else
{ {
png_chunk_error(png_ptr, "CRC error"); png_chunk_benign_error(png_ptr, "CRC error");
return (0);
} }
return (1); return (1);
} }
...@@ -376,7 +377,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -376,7 +377,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width); png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width);
png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth); png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth);
png_debug1(3,"channels = %d\n", png_ptr->channels); png_debug1(3,"channels = %d\n", png_ptr->channels);
png_debug1(3,"rowbytes = %lu\n", png_ptr->rowbytes); png_debug1(3,"rowbytes = %lu\n", (unsigned long) png_ptr->rowbytes);
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,
color_type, interlace_type, compression_type, filter_type); color_type, interlace_type, compression_type, filter_type);
} }
...@@ -481,7 +482,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -481,7 +482,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{ {
if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)
{ {
png_chunk_error(png_ptr, "CRC error"); png_chunk_benign_error(png_ptr, "CRC error");
} }
else else
{ {
...@@ -693,7 +694,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -693,7 +694,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
void /* PRIVATE */ void /* PRIVATE */
png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{ {
png_byte buf[4]; png_byte buf[32];
#ifdef PNG_FLOATING_POINT_SUPPORTED #ifdef PNG_FLOATING_POINT_SUPPORTED
float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
#endif #endif
...@@ -734,62 +735,46 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -734,62 +735,46 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return; return;
} }
png_crc_read(png_ptr, buf, 4); png_crc_read(png_ptr, buf, 32);
uint_x = png_get_uint_32(buf); if (png_crc_finish(png_ptr, 0))
return;
png_crc_read(png_ptr, buf, 4);
uint_y = png_get_uint_32(buf);
uint_x = png_get_uint_32(buf);
uint_y = png_get_uint_32(buf + 4);
if (uint_x > 80000L || uint_y > 80000L || if (uint_x > 80000L || uint_y > 80000L ||
uint_x + uint_y > 100000L) uint_x + uint_y > 100000L)
{ {
png_warning(png_ptr, "Invalid cHRM white point"); png_warning(png_ptr, "Invalid cHRM white point");
png_crc_finish(png_ptr, 24);
return; return;
} }
int_x_white = (png_fixed_point)uint_x; int_x_white = (png_fixed_point)uint_x;
int_y_white = (png_fixed_point)uint_y; int_y_white = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4); uint_x = png_get_uint_32(buf + 8);
uint_x = png_get_uint_32(buf); uint_y = png_get_uint_32(buf + 12);
png_crc_read(png_ptr, buf, 4);
uint_y = png_get_uint_32(buf);
if (uint_x + uint_y > 100000L) if (uint_x + uint_y > 100000L)
{ {
png_warning(png_ptr, "Invalid cHRM red point"); png_warning(png_ptr, "Invalid cHRM red point");
png_crc_finish(png_ptr, 16);
return; return;
} }
int_x_red = (png_fixed_point)uint_x; int_x_red = (png_fixed_point)uint_x;
int_y_red = (png_fixed_point)uint_y; int_y_red = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4); uint_x = png_get_uint_32(buf + 16);
uint_x = png_get_uint_32(buf); uint_y = png_get_uint_32(buf + 20);
png_crc_read(png_ptr, buf, 4);
uint_y = png_get_uint_32(buf);
if (uint_x + uint_y > 100000L) if (uint_x + uint_y > 100000L)
{ {
png_warning(png_ptr, "Invalid cHRM green point"); png_warning(png_ptr, "Invalid cHRM green point");
png_crc_finish(png_ptr, 8);
return; return;
} }
int_x_green = (png_fixed_point)uint_x; int_x_green = (png_fixed_point)uint_x;
int_y_green = (png_fixed_point)uint_y; int_y_green = (png_fixed_point)uint_y;
png_crc_read(png_ptr, buf, 4); uint_x = png_get_uint_32(buf + 24);
uint_x = png_get_uint_32(buf); uint_y = png_get_uint_32(buf + 28);
png_crc_read(png_ptr, buf, 4);
uint_y = png_get_uint_32(buf);
if (uint_x + uint_y > 100000L) if (uint_x + uint_y > 100000L)
{ {
png_warning(png_ptr, "Invalid cHRM blue point"); png_warning(png_ptr, "Invalid cHRM blue point");
png_crc_finish(png_ptr, 0);
return; return;
} }
int_x_blue = (png_fixed_point)uint_x; int_x_blue = (png_fixed_point)uint_x;
...@@ -807,7 +792,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -807,7 +792,7 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#endif #endif
#if defined(PNG_READ_sRGB_SUPPORTED) #if defined(PNG_READ_sRGB_SUPPORTED)
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)) if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))
{ {
if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) || if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) || PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) ||
...@@ -818,7 +803,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -818,7 +803,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) || PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) ||
PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000)) PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000))
{ {
png_warning(png_ptr, png_warning(png_ptr,
"Ignoring incorrect cHRM value when sRGB is also present"); "Ignoring incorrect cHRM value when sRGB is also present");
#ifndef PNG_NO_CONSOLE_IO #ifndef PNG_NO_CONSOLE_IO
...@@ -835,7 +819,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -835,7 +819,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#endif #endif
#endif /* PNG_NO_CONSOLE_IO */ #endif /* PNG_NO_CONSOLE_IO */
} }
png_crc_finish(png_ptr, 0);
return; return;
} }
#endif /* PNG_READ_sRGB_SUPPORTED */ #endif /* PNG_READ_sRGB_SUPPORTED */
...@@ -849,8 +832,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -849,8 +832,6 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
int_x_white, int_y_white, int_x_red, int_y_red, int_x_green, int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
int_y_green, int_x_blue, int_y_blue); int_y_green, int_x_blue, int_y_blue);
#endif #endif
if (png_crc_finish(png_ptr, 0))
return;
} }
#endif #endif
...@@ -1557,7 +1538,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -1557,7 +1538,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
} }
png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n", png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n",
length + 1); (unsigned long) (length + 1));
purpose = (png_charp)png_malloc_warn(png_ptr, length + 1); purpose = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (purpose == NULL) if (purpose == NULL)
{ {
...@@ -1688,7 +1669,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ...@@ -1688,7 +1669,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
} }
png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n", png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n",
length + 1); (unsigned long) (length + 1));
buffer = (png_charp)png_malloc_warn(png_ptr, length + 1); buffer = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (buffer == NULL) if (buffer == NULL)
{ {
...@@ -2664,7 +2645,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row, ...@@ -2664,7 +2645,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
png_bytep prev_row, int filter) png_bytep prev_row, int filter)
{ {
png_debug(1, "in png_read_filter_row\n"); png_debug(1, "in png_read_filter_row\n");
png_debug2(2,"row = %lu, filter = %d\n", png_ptr->row_number, filter); png_debug2(2,"row = %lu, filter = %d\n",
(unsigned long) png_ptr->row_number, filter);
switch (filter) switch (filter)
{ {
case PNG_FILTER_VALUE_NONE: case PNG_FILTER_VALUE_NONE:
...@@ -3090,12 +3072,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) ...@@ -3090,12 +3072,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1); png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
png_debug1(3, "width = %lu,\n", png_ptr->width); png_debug1(3, "width = %lu,\n", (unsigned long) png_ptr->width);
png_debug1(3, "height = %lu,\n", png_ptr->height); png_debug1(3, "height = %lu,\n", (unsigned long) png_ptr->height);
png_debug1(3, "iwidth = %lu,\n", png_ptr->iwidth); png_debug1(3, "iwidth = %lu,\n", (unsigned long) png_ptr->iwidth);
png_debug1(3, "num_rows = %lu\n", png_ptr->num_rows); png_debug1(3, "num_rows = %lu\n", (unsigned long) png_ptr->num_rows);
png_debug1(3, "rowbytes = %lu,\n", png_ptr->rowbytes); png_debug1(3, "rowbytes = %lu,\n", (unsigned long) png_ptr->rowbytes);
png_debug1(3, "irowbytes = %lu,\n", png_ptr->irowbytes); png_debug1(3, "irowbytes = %lu,\n", (unsigned long) png_ptr->irowbytes);
png_ptr->flags |= PNG_FLAG_ROW_INIT; png_ptr->flags |= PNG_FLAG_ROW_INIT;
} }
......
...@@ -394,7 +394,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, ...@@ -394,7 +394,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
return; return;
length = png_strlen(purpose) + 1; length = png_strlen(purpose) + 1;
png_debug1(3, "allocating purpose for info (%lu bytes)\n", length); png_debug1(3, "allocating purpose for info (%lu bytes)\n",
(unsigned long) length);
info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length); info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_purpose == NULL) if (info_ptr->pcal_purpose == NULL)
{ {
...@@ -410,7 +411,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, ...@@ -410,7 +411,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr->pcal_nparams = (png_byte)nparams; info_ptr->pcal_nparams = (png_byte)nparams;
length = png_strlen(units) + 1; length = png_strlen(units) + 1;
png_debug1(3, "allocating units for info (%lu bytes)\n", length); png_debug1(3, "allocating units for info (%lu bytes)\n",
(unsigned long)length);
info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length); info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_units == NULL) if (info_ptr->pcal_units == NULL)
{ {
...@@ -432,7 +434,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr, ...@@ -432,7 +434,8 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
for (i = 0; i < nparams; i++) for (i = 0; i < nparams; i++)
{ {
length = png_strlen(params[i]) + 1; length = png_strlen(params[i]) + 1;
png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length); png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i,
(unsigned long) length);
info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
if (info_ptr->pcal_params[i] == NULL) if (info_ptr->pcal_params[i] == NULL)
{ {
...@@ -832,7 +835,8 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr, ...@@ -832,7 +835,8 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
if (textp->key == NULL) if (textp->key == NULL)
return(1); return(1);
png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n", png_debug2(2, "Allocated %lu bytes at %x in png_set_text\n",
(png_uint_32)(key_len + lang_len + lang_key_len + text_length + 4), (unsigned long)(png_uint_32)(key_len + lang_len + lang_key_len
+ text_length + 4),
(int)textp->key); (int)textp->key);
png_memcpy(textp->key, text_ptr[i].key, png_memcpy(textp->key, text_ptr[i].key,
...@@ -1246,4 +1250,17 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max, ...@@ -1246,4 +1250,17 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
} }
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
#if defined(PNG_BENIGN_ERRORS_SUPPORTED)
void PNGAPI
png_set_benign_errors(png_structp png_ptr, int allowed)
{
png_debug(1, "in png_set_benign_errors\n");
if (allowed)
png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
else
png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
}
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
...@@ -493,7 +493,8 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size) ...@@ -493,7 +493,8 @@ png_debug_malloc(png_structp png_ptr, png_uint_32 size)
/* Make sure the caller isn't assuming zeroed memory. */ /* Make sure the caller isn't assuming zeroed memory. */
png_memset(pinfo->pointer, 0xdd, pinfo->size); png_memset(pinfo->pointer, 0xdd, pinfo->size);
if(verbose) if(verbose)
printf("png_malloc %lu bytes at %x\n",size,pinfo->pointer); printf("png_malloc %lu bytes at %x\n",(unsigned long) size,
pinfo->pointer);
return (png_voidp)(pinfo->pointer); return (png_voidp)(pinfo->pointer);
} }
} }
...@@ -1132,7 +1133,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname) ...@@ -1132,7 +1133,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
iwidth = png_get_image_width(write_ptr, write_info_ptr); iwidth = png_get_image_width(write_ptr, write_info_ptr);
iheight = png_get_image_height(write_ptr, write_info_ptr); iheight = png_get_image_height(write_ptr, write_info_ptr);
fprintf(STDERR, "Image width = %lu, height = %lu\n", fprintf(STDERR, "Image width = %lu, height = %lu\n",
iwidth, iheight); (unsigned long) iwidth, (unsigned long) iheight);
} }
#endif #endif
...@@ -1246,7 +1247,8 @@ main(int argc, char *argv[]) ...@@ -1246,7 +1247,8 @@ main(int argc, char *argv[])
fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION); fprintf(STDERR, " with zlib version %s\n", ZLIB_VERSION);
fprintf(STDERR,"%s",png_get_copyright(NULL)); fprintf(STDERR,"%s",png_get_copyright(NULL));
/* Show the version of libpng used in building the library */ /* Show the version of libpng used in building the library */
fprintf(STDERR," library (%lu):%s", png_access_version_number(), fprintf(STDERR," library (%lu):%s",
(unsigned long) png_access_version_number(),
png_get_header_version(NULL)); png_get_header_version(NULL));
/* Show the version of libpng used in building the application */ /* Show the version of libpng used in building the application */
fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, fprintf(STDERR," pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
...@@ -1334,7 +1336,8 @@ main(int argc, char *argv[]) ...@@ -1334,7 +1336,8 @@ main(int argc, char *argv[])
if (kerror == 0) if (kerror == 0)
{ {
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples); fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long) zero_samples);
#else #else
fprintf(STDERR, " PASS\n"); fprintf(STDERR, " PASS\n");
#endif #endif
...@@ -1342,7 +1345,7 @@ main(int argc, char *argv[]) ...@@ -1342,7 +1345,7 @@ main(int argc, char *argv[])
for (k=0; k<256; k++) for (k=0; k<256; k++)
if(filters_used[k]) if(filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n", fprintf(STDERR, " Filter %d was used %lu times\n",
k,filters_used[k]); k, (unsigned long) filters_used[k]);
#endif #endif
#if defined(PNG_TIME_RFC1123_SUPPORTED) #if defined(PNG_TIME_RFC1123_SUPPORTED)
if(tIME_chunk_present != 0) if(tIME_chunk_present != 0)
...@@ -1367,7 +1370,8 @@ main(int argc, char *argv[]) ...@@ -1367,7 +1370,8 @@ main(int argc, char *argv[])
current_allocation); current_allocation);
while (pinfo != NULL) while (pinfo != NULL)
{ {
fprintf(STDERR, " %lu bytes at %x\n", pinfo->size, fprintf(STDERR, " %lu bytes at %x\n",
(unsigned long) pinfo->size,
(unsigned int) pinfo->pointer); (unsigned int) pinfo->pointer);
pinfo = pinfo->next; pinfo = pinfo->next;
} }
...@@ -1407,7 +1411,8 @@ main(int argc, char *argv[]) ...@@ -1407,7 +1411,8 @@ main(int argc, char *argv[])
int k; int k;
#endif #endif
#if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) #if defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
fprintf(STDERR, "\n PASS (%lu zero samples)\n",zero_samples); fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long) zero_samples);
#else #else
fprintf(STDERR, " PASS\n"); fprintf(STDERR, " PASS\n");
#endif #endif
...@@ -1415,7 +1420,8 @@ main(int argc, char *argv[]) ...@@ -1415,7 +1420,8 @@ main(int argc, char *argv[])
for (k=0; k<256; k++) for (k=0; k<256; k++)
if(filters_used[k]) if(filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n", fprintf(STDERR, " Filter %d was used %lu times\n",
k,filters_used[k]); k,
(unsigned long) filters_used[k]);
#endif #endif
#if defined(PNG_TIME_RFC1123_SUPPORTED) #if defined(PNG_TIME_RFC1123_SUPPORTED)
if(tIME_chunk_present != 0) if(tIME_chunk_present != 0)
...@@ -1443,7 +1449,7 @@ main(int argc, char *argv[]) ...@@ -1443,7 +1449,7 @@ main(int argc, char *argv[])
while (pinfo != NULL) while (pinfo != NULL)
{ {
fprintf(STDERR," %lu bytes at %x\n", fprintf(STDERR," %lu bytes at %x\n",
pinfo->size, (unsigned int)pinfo->pointer); (unsigned long) pinfo->size, (unsigned int)pinfo->pointer);
pinfo = pinfo->next; pinfo = pinfo->next;
} }
} }
...@@ -1483,4 +1489,4 @@ main(int argc, char *argv[]) ...@@ -1483,4 +1489,4 @@ main(int argc, char *argv[])
} }
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef version_1_4_0beta6 your_png_h_is_not_version_1_4_0beta6; typedef version_1_4_0beta7 your_png_h_is_not_version_1_4_0beta7;
pngtest.png

8.4 KB | W: | H:

pngtest.png

8.4 KB | W: | H:

pngtest.png
pngtest.png
pngtest.png
pngtest.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -808,11 +808,13 @@ png_write_row(png_structp png_ptr, png_bytep row) ...@@ -808,11 +808,13 @@ png_write_row(png_structp png_ptr, png_bytep row)
png_ptr->row_info.width); png_ptr->row_info.width);
png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type); png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type);
png_debug1(3, "row_info->width = %lu\n", png_ptr->row_info.width); png_debug1(3, "row_info->width = %lu\n",
(unsigned long) png_ptr->row_info.width);
png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels); png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels);
png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth); png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth);
png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth); png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth);
png_debug1(3, "row_info->rowbytes = %lu\n", png_ptr->row_info.rowbytes); png_debug1(3, "row_info->rowbytes = %lu\n",
(unsigned long) png_ptr->row_info.rowbytes);
/* Copy user's row into buffer, leaving room for filter byte. */ /* Copy user's row into buffer, leaving room for filter byte. */
png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row, png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row,
......
...@@ -51,6 +51,23 @@ png_save_uint_16(png_bytep buf, unsigned int i) ...@@ -51,6 +51,23 @@ png_save_uint_16(png_bytep buf, unsigned int i)
buf[1] = (png_byte)(i & 0xff); buf[1] = (png_byte)(i & 0xff);
} }
/* Simple function to write the signature. If we have already written
* the magic bytes of the signature, or more likely, the PNG stream is
* being embedded into another stream and doesn't need its own signature,
* we should call png_set_sig_bytes() to tell libpng how many of the
* bytes have already been written.
*/
void PNGAPI
png_write_sig(png_structp png_ptr)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
/* write the rest of the 8 byte signature */
png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
(png_size_t)8 - png_ptr->sig_bytes);
if(png_ptr->sig_bytes < 3)
png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
}
/* Write a PNG chunk all at once. The type is an array of ASCII characters /* Write a PNG chunk all at once. The type is an array of ASCII characters
* representing the chunk name. The array must be at least 4 bytes in * representing the chunk name. The array must be at least 4 bytes in
* length, and does not need to be null terminated. To be safe, pass the * length, and does not need to be null terminated. To be safe, pass the
...@@ -78,7 +95,8 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name, ...@@ -78,7 +95,8 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_uint_32 length) png_uint_32 length)
{ {
png_byte buf[4]; png_byte buf[4];
png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length); png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name,
(unsigned long) length);
/* write the length */ /* write the length */
png_save_uint_32(buf, length); png_save_uint_32(buf, length);
...@@ -119,23 +137,6 @@ png_write_chunk_end(png_structp png_ptr) ...@@ -119,23 +137,6 @@ png_write_chunk_end(png_structp png_ptr)
png_write_data(png_ptr, buf, (png_size_t)4); png_write_data(png_ptr, buf, (png_size_t)4);
} }
/* Simple function to write the signature. If we have already written
* the magic bytes of the signature, or more likely, the PNG stream is
* being embedded into another stream and doesn't need its own signature,
* we should call png_set_sig_bytes() to tell libpng how many of the
* bytes have already been written.
*/
void /* PRIVATE */
png_write_sig(png_structp png_ptr)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
/* write the rest of the 8 byte signature */
png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
(png_size_t)8 - png_ptr->sig_bytes);
if(png_ptr->sig_bytes < 3)
png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
}
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED) #if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_iCCP_SUPPORTED)
/* /*
* This pair of functions encapsulates the operation of (a) compressing a * This pair of functions encapsulates the operation of (a) compressing a
...@@ -990,7 +991,8 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x, ...@@ -990,7 +991,8 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
{ {
png_warning(png_ptr, "Invalid fixed cHRM white point specified"); png_warning(png_ptr, "Invalid fixed cHRM white point specified");
#if !defined(PNG_NO_CONSOLE_IO) #if !defined(PNG_NO_CONSOLE_IO)
fprintf(stderr,"white_x=%ld, white_y=%ld\n",white_x, white_y); fprintf(stderr,"white_x=%ld, white_y=%ld\n",(unsigned long)white_x,
(unsigned long)white_y);
#endif #endif
return; return;
} }
...@@ -1538,7 +1540,8 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, ...@@ -1538,7 +1540,8 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
for (i = 0; i < nparams; i++) for (i = 0; i < nparams; i++)
{ {
params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1); params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1);
png_debug2(3, "pCAL parameter %d length = %lu\n", i, params_len[i]); png_debug2(3, "pCAL parameter %d length = %lu\n", i,
(unsigned long) params_len[i]);
total_len += (png_size_t)params_len[i]; total_len += (png_size_t)params_len[i];
} }
...@@ -1569,28 +1572,24 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0, ...@@ -1569,28 +1572,24 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
/* write the sCAL chunk */ /* write the sCAL chunk */
#if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO) #if defined(PNG_FLOATING_POINT_SUPPORTED) && !defined(PNG_NO_STDIO)
void /* PRIVATE */ void /* PRIVATE */
png_write_sCAL(png_structp png_ptr, int unit, double width,double height) png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
{ {
#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_USE_LOCAL_ARRAYS
PNG_sCAL; PNG_sCAL;
#endif #endif
png_size_t total_len; png_size_t total_len;
char wbuf[32], hbuf[32]; char buf[64];
png_byte bunit = (png_byte)unit;
png_debug(1, "in png_write_sCAL\n"); png_debug(1, "in png_write_sCAL\n");
png_sprintf(wbuf, "%12.12e", width); buf[0] = (char)unit;
png_sprintf(hbuf, "%12.12e", height);
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf);
png_debug1(3, "sCAL total length = %d\n", (int)total_len); png_sprintf(buf + 1, "%12.12e", width);
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); total_len = 1 + png_strlen(buf + 1) + 1;
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1); png_sprintf(buf + total_len, "%12.12e", height);
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1); total_len += png_strlen(buf + total_len);
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf)); png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
png_write_chunk_end(png_ptr);
} }
#else #else
#ifdef PNG_FIXED_POINT_SUPPORTED #ifdef PNG_FIXED_POINT_SUPPORTED
...@@ -1601,23 +1600,26 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width, ...@@ -1601,23 +1600,26 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
#ifdef PNG_USE_LOCAL_ARRAYS #ifdef PNG_USE_LOCAL_ARRAYS
PNG_sCAL; PNG_sCAL;
#endif #endif
png_size_t total_len; png_byte buf[64];
char wbuf[32], hbuf[32]; png_size_t wlen, hlen, total_len;
png_byte bunit = unit;
png_debug(1, "in png_write_sCAL_s\n"); png_debug(1, "in png_write_sCAL_s\n");
png_strcpy(wbuf,(const char *)width); wlen = png_strlen(width);
png_strcpy(hbuf,(const char *)height); hlen = png_strlen(height);
total_len = 1 + png_strlen(wbuf)+1 + png_strlen(hbuf); total_len = wlen + hlen + 2;
if (total_len > 64)
{
png_warning(png_ptr, "Can't write sCAL (buffer too small)");
return;
}
png_debug1(3, "sCAL total length = %d\n", total_len); buf[0] = (png_byte)unit;
png_write_chunk_start(png_ptr, (png_bytep)png_sCAL, (png_uint_32)total_len); png_memcpy(buf + 1, width, wlen + 1); /* append the '\0' here */
png_write_chunk_data(png_ptr, (png_bytep)&bunit, 1); png_memcpy(buf + wlen + 2, height, hlen); /* do NOT append the '\0' here */
png_write_chunk_data(png_ptr, (png_bytep)wbuf, png_strlen(wbuf)+1);
png_write_chunk_data(png_ptr, (png_bytep)hbuf, png_strlen(hbuf));
png_write_chunk_end(png_ptr); png_debug1(3, "sCAL total length = %u\n", (unsigned int)total_len);
png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len);
} }
#endif #endif
#endif #endif
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Modeled after libxml-config. # Modeled after libxml-config.
version=1.4.0beta6 version=1.4.0beta7
prefix="" prefix=""
libdir="" libdir=""
libs="" libs=""
......
...@@ -5,6 +5,6 @@ includedir=@includedir@/libpng14 ...@@ -5,6 +5,6 @@ includedir=@includedir@/libpng14
Name: libpng Name: libpng
Description: Loads and saves PNG files Description: Loads and saves PNG files
Version: 1.4.0beta6 Version: 1.4.0beta7
Libs: -L${libdir} -lpng14 Libs: -L${libdir} -lpng14
Cflags: -I${includedir} Cflags: -I${includedir}
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -20,7 +20,7 @@ LN_SF = ln -f -s ...@@ -20,7 +20,7 @@ LN_SF = ln -f -s
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local prefix=/usr/local
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
...@@ -173,7 +173,7 @@ test-dd: ...@@ -173,7 +173,7 @@ test-dd:
echo Testing installed dynamic shared library in $(DL). echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \ $(CC) -I$(DI) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1,-rpath $(ZLIBLIB):$(DL) \ -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png ./pngtestd pngtest.png
......
...@@ -65,7 +65,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ ...@@ -65,7 +65,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
CYGDLL = 14 CYGDLL = 14
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll SHAREDLIB=cygpng$(CYGDLL).dll
......
...@@ -19,7 +19,7 @@ ZLIBINC=../zlib ...@@ -19,7 +19,7 @@ ZLIBINC=../zlib
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# Library name: # Library name:
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng14 LIBNAME = libpng14
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
...@@ -215,7 +215,7 @@ test-dd: ...@@ -215,7 +215,7 @@ test-dd:
echo Testing installed dynamic shared library in $(DL). echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \ $(CC) -I$(DI) -I$(ZLIBINC) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png ./pngtestd pngtest.png
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
...@@ -231,7 +231,7 @@ test-dd: ...@@ -231,7 +231,7 @@ test-dd:
echo Testing installed dynamic shared library in $(DL). echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \ $(CC) -I$(DI) -I$(ZLIBINC) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png ./pngtestd pngtest.png
......
...@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include ...@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
...@@ -185,7 +185,7 @@ test-dd: ...@@ -185,7 +185,7 @@ test-dd:
echo Testing installed dynamic shared library in $(DL). echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \ $(CC) -I$(DI) -I$(ZLIBINC) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png ./pngtestd pngtest.png
......
...@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include ...@@ -18,7 +18,7 @@ ZLIBINC=/opt/zlib/include
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
...@@ -190,7 +190,7 @@ test-dd: ...@@ -190,7 +190,7 @@ test-dd:
echo Testing installed dynamic shared library in $(DL). echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) -I$(ZLIBINC) \ $(CC) -I$(DI) -I$(ZLIBINC) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \ `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \ -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png ./pngtestd pngtest.png
......
...@@ -66,7 +66,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ ...@@ -66,7 +66,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
MINGDLL = 14 MINGDLL = 14
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll SHAREDLIB=libpng$(MINGDLL).dll
......
...@@ -14,7 +14,7 @@ INCSDIR=${LOCALBASE}/include/libpng14 ...@@ -14,7 +14,7 @@ INCSDIR=${LOCALBASE}/include/libpng14
LIB= png12 LIB= png12
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.4.0beta6 SHLIB_MINOR= 1.4.0beta7
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c pngwtran.c pngmem.c pngerror.c pngpread.c
......
...@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng ...@@ -13,7 +13,7 @@ INCSDIR=${LOCALBASE}/include/libpng
LIB= png LIB= png
SHLIB_MAJOR= 3 SHLIB_MAJOR= 3
SHLIB_MINOR= 1.4.0beta6 SHLIB_MINOR= 1.4.0beta7
SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c pngwtran.c pngmem.c pngerror.c pngpread.c
......
...@@ -8,7 +8,7 @@ LIBDIR= ${PREFIX}/lib ...@@ -8,7 +8,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.4.0beta6 SHLIB_MINOR= 1.4.0beta7
LIB= png LIB= png
SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \ SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Library name: # Library name:
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# Library name: # Library name:
LIBNAME=libpng14 LIBNAME=libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng14 LIBNAME = libpng14
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# Library name: # Library name:
LIBNAME = libpng14 LIBNAME = libpng14
PNGMAJ = 1 PNGMAJ = 1
PNGMIN = 1.4.0beta6 PNGMIN = 1.4.0beta7
PNGVER = $(PNGMAJ).$(PNGMIN) PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names: # Shared library names:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2 ; PNG.LIB module definition file for OS/2
;---------------------------------------- ;----------------------------------------
; Version 1.4.0beta6 ; Version 1.4.0beta7
LIBRARY PNG LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2" DESCRIPTION "PNG image compression library for OS/2"
...@@ -173,6 +173,7 @@ EXPORTS ...@@ -173,6 +173,7 @@ EXPORTS
png_write_png png_write_png
png_write_row png_write_row
png_write_rows png_write_rows
png_write_sig
png_read_init_2 png_read_init_2
png_write_init_2 png_write_init_2
png_access_version_number png_access_version_number
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
LIBRARY LIBRARY
EXPORTS EXPORTS
;Version 1.4.0beta6 ;Version 1.4.0beta7
png_build_grayscale_palette @1 png_build_grayscale_palette @1
png_chunk_error @3 png_chunk_error @3
png_chunk_warning @4 png_chunk_warning @4
...@@ -221,3 +221,8 @@ EXPORTS ...@@ -221,3 +221,8 @@ EXPORTS
png_save_int_32 @205 png_save_int_32 @205
png_get_uint_31 @206 png_get_uint_31 @206
png_set_expand_gray_1_2_4_to_8 @207 png_set_expand_gray_1_2_4_to_8 @207
; Added at version 1.4.0
png_write_sig @208
; png_benign_error @209
; png_benign_chunk_error @210
; png_set_benign_error @211
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册