summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2011-04-08 11:58:34 -0500
committerGlenn Randers-Pehrson <glennrp@shaggy.simplesystems.org>2011-09-03 13:21:45 -0500
commitca65e818bc1d4b85d3b007a164c07eec6e599c16 (patch)
treedf25f603e1c81580b94c9f413157992296cdfec4
parent2097be028d4cb15076cf1654f8642a8d8d70908b (diff)
downloadlibpng-ca65e818bc1d4b85d3b007a164c07eec6e599c16.tar.gz
[stable] libpng 1.4.6
-rw-r--r--ANNOUNCE71
-rw-r--r--CHANGES53
-rw-r--r--CMakeLists.txt67
-rw-r--r--INSTALL4
-rw-r--r--LICENSE4
-rw-r--r--README12
-rwxr-xr-xconfigure24
-rw-r--r--configure.ac6
-rw-r--r--contrib/pngminim/decoder/makefile1
-rw-r--r--contrib/pngminim/encoder/makefile1
-rw-r--r--contrib/pngminim/encoder/pngusr.h2
-rw-r--r--contrib/pngminim/preader/makefile1
-rw-r--r--contrib/pngminim/preader/pngusr.h2
-rw-r--r--contrib/pngsuite/README59
-rw-r--r--libpng-1.4.6.txt (renamed from libpng-1.4.5.txt)84
-rw-r--r--libpng.3369
-rw-r--r--libpngpf.34
-rw-r--r--png.52
-rw-r--r--png.c24
-rw-r--r--png.h236
-rw-r--r--pngconf.h53
-rw-r--r--pngerror.c12
-rw-r--r--pngget.c120
-rw-r--r--pngmem.c6
-rw-r--r--pngpread.c15
-rw-r--r--pngpriv.h4
-rw-r--r--pngread.c10
-rw-r--r--pngrio.c4
-rw-r--r--pngrtran.c10
-rw-r--r--pngrutil.c35
-rw-r--r--pngset.c4
-rw-r--r--pngtest.c8
-rw-r--r--pngtrans.c6
-rw-r--r--pngwrite.c15
-rw-r--r--pngwutil.c15
-rw-r--r--projects/vstudio/readme.txt2
-rw-r--r--projects/vstudio/zlib.props8
-rw-r--r--scripts/README.txt12
-rwxr-xr-xscripts/libpng-config-head.in2
-rw-r--r--scripts/libpng.pc.in2
-rw-r--r--scripts/makefile.cegcc2
-rw-r--r--scripts/makefile.linux2
-rw-r--r--scripts/makefile.ne12bsd2
-rw-r--r--scripts/makefile.netbsd2
-rw-r--r--scripts/makefile.openbsd2
-rw-r--r--scripts/makefile.vcwin322
-rw-r--r--scripts/png32ce.def11
-rw-r--r--scripts/pngos2.def7
-rw-r--r--scripts/pngwin.def13
49 files changed, 854 insertions, 558 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index dfcfcb65a..b5f7d200d 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.4.5 - December 9, 2010
+Libpng 1.4.6 - April 8, 2011
This is a public release of libpng, intended for use in production codes.
@@ -8,44 +8,51 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.4.5.tar.xz (LZMA-compressed, recommended)
- libpng-1.4.5.tar.gz
- libpng-1.4.5.tar.bz2
+ libpng-1.4.6.tar.xz (LZMA-compressed, recommended)
+ libpng-1.4.6.tar.gz
+ libpng-1.4.6.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng145.zip
- lpng145.7z
+ lpng146.7z (LZMA-compressed, recommended)
+ lpng146.zip
Other information:
- libpng-1.4.5-README.txt
- libpng-1.4.5-LICENSE.txt
-
-Changes since the last public release (1.4.4):
-
- Fixed possible configure.ac bug introduced in version 1.4.4.
- Wrapped long lines in CMakeLists.txt and introduced ${libpng_public_hdrs}
- Check for out-of-range text compression mode in png_set_text().
- Removed some extraneous parentheses that appeared in pngrutil.c of
- libpng-1.4.3
- Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin)
- Moved reading of file signature into png_read_sig (Cosmin)
- Fixed atomicity of chunk header serialization (Cosmin)
- Added test for io_state in pngtest.c (Cosmin)
- Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts.
- Changes to remove gcc warnings (John Bowler)
- Certain optional gcc warning flags resulted in warnings in libpng code.
- With these changes only -Wconversion and -Wcast-qual cannot be turned on.
- Changes are trivial rearrangements of code. -Wconversion is not possible
- for pngrutil.c (because of the widespread use of += et al on variables
- smaller than (int) or (unsigned int)) and -Wcast-qual is not possible
- with pngwio.c and pngwutil.c because the 'write' callback and zlib
- compression both fail to declare their input buffers with 'const'.
- Added comment about the potential API incompatibility of the
- png_get_uint_16() macro with libpng-1.4.0 through 1.4.4.
- Removed PNG_NO_WRITE_GAMMA from pngminim/encoder/pngusr.h
+ libpng-1.4.6-README.txt
+ libpng-1.4.6-LICENSE.txt
+
+Changes since the last public release (1.4.5):
+
+ Fixed bug in background transformation handling in pngrtran.c (it was
+ looking for the flag in png_ptr->transformations instead of in
+ png_ptr->flags) (David Raymond).
+ Fixed misspelled macros in contrib/pngminim (Cosmin)
+ Updated CMakeLists.txt (Clifford Yapp)
+ Fixed some typecasts in png_debug statements (Cosmin).
+ Updated documentation of png_set|get_tRNS() (Thomas Klausner).
+ Added png_const_structp and png_const_infop types, and used them in
+ prototypes for most png_get_*() functions.
+ In the manual, describe the png_get_IHDR() arguments in the correct order.
+ Updated the synopses in the manual to reflect recent changes.
+ Fixed a typo in the *.def files and deleted entries that are now
+ declared in pngpriv.h
+ Updated contrib/pngsuite/README to add the word "modify".
+ Added the private PNG_UNUSED() macro definition in pngconf.h.
+ ifdef out mask arrays in pngread.c when interlacing is not supported.
+ Added attribute definition (warnings) for MSC_VER >= 1300 in pngconf.h
+ Added -D_CRT_SECURE_NO_DEPRECATE to CFLAGS in makefile.vcwin32
+ Fixed mistake in the descriptions of user read_transform and write_transform
+ function prototypes in the manual. The row_info struct is png_row_infop.
+ Added a request in the manual that applications do not use "png_" or
+ "PNG_" to begin any of their own symbols.
+ Fixed incorrect examples of callback prototypes in the manual, that were
+ introduced in libpng-1.0.0.
+ Removed "strip" from contrib/pngminim/*/makefile.
+ Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail
+ to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill)
+ Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03).
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit
diff --git a/CHANGES b/CHANGES
index b3880896d..d77826a8d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2735,6 +2735,59 @@ version 1.4.5rc03 [December 3, 2010]
version 1.4.5 [December 9, 2010]
Removed PNG_NO_WRITE_GAMMA from pngminim/encoder/pngusr.h
+version 1.4.6beta01 [December 29, 2010]
+ Fixed bug in background transformation handling in pngrtran.c (it was
+ looking for the flag in png_ptr->transformations instead of in
+ png_ptr->flags) (David Raymond).
+
+version 1.4.6beta02 [January 14, 2011]
+ Fixed misspelled macros in contrib/pngminim (Cosmin).
+ Updated CMakeLists.txt (Clifford Yapp).
+
+version 1.4.6beta03 [January 14, 2011]
+ Fixed some typecasts in png_debug statements (Cosmin).
+
+version 1.4.6beta04 [January 22, 2011]
+ Updated documentation of png_set|get_tRNS() (Thomas Klausner).
+ Added png_const_structp and png_const_infop types, and used them in
+ prototypes for most png_get_*() functions.
+ In the manual, describe the png_get_IHDR() arguments in the correct order.
+ Ported change in png_do_rgb_to_gray() from libpng-1.5.1, to make
+ it more robust against internal libpng coding errors.
+
+version 1.4.6beta05 [January 23, 2011]
+
+ Updated the synopses in the manual to reflect recent changes.
+ Fixed a typo in the *.def files and deleted entries that are now
+ declared in pngpriv.h
+
+version 1.4.6beta06 [March 19, 2011]
+ Updated contrib/pngsuite/README to add the word "modify".
+ Added the private PNG_UNUSED() macro definition in pngconf.h.
+
+version 1.4.6beta07 [March 22, 2011]
+ ifdef out mask arrays in pngread.c when interlacing is not supported.
+ Added attribute definition (warnings) for MSC_VER >= 1300 in pngconf.h
+ Added -D_CRT_SECURE_NO_DEPRECATE to CFLAGS in makefile.vcwin32
+ Fixed mistake in the descriptions of user read_transform and write_transform
+ function prototypes in the manual. The row_info struct is png_row_infop.
+ Added a request in the manual that applications do not use "png_" or
+ "PNG_" to begin any of their own symbols.
+ Fixed incorrect examples of callback prototypes in the manual, that were
+ introduced in libpng-1.0.0.
+ Removed "strip" from contrib/pngminim/*/makefile.
+ Fixed a bug (present since libpng-1.0.7) that makes png_handle_sPLT() fail
+ to compile when PNG_NO_POINTER_INDEXING is defined (Chubanov Kirill)
+
+version 1.4.6rc01 [March 31, 2011]
+ No changes.
+
+version 1.4.6rc02 [April 6, 2011]
+ Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03).
+
+version 1.4.6 [April 8, 2011]
+ No changes.
+
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 24a38c4f4..d14cdf85e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,7 +33,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 4)
-set(PNGLIB_RELEASE 5)
+set(PNGLIB_RELEASE 6)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -231,28 +231,31 @@ endmacro()
# CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
- set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
+ set(CMAKE_INSTALL_LIBDIR lib)
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
-set(libdir ${CMAKE_INSTALL_LIBDIR})
+set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
-_png_generate_symlink_code(PNG_PC_INSTALL_CODE ${PNGLIB_NAME}.pc libpng.pc)
+_png_generate_symlink_code(PNG_PC_INSTALL_CODE
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc)
install(CODE ${PNG_PC_INSTALL_CODE})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
-_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE ${PNGLIB_NAME}-config
- libpng-config)
+_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
install(CODE ${PNG_CONFIG_INSTALL_CODE})
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 14.${PNGLIB_RELEASE}.1.4.5
+# VERSION 14.${PNGLIB_RELEASE}.1.4.6
VERSION 14.${PNGLIB_RELEASE}.0
SOVERSION 14
CLEAN_DIRECT_OUTPUT 1)
@@ -298,13 +301,23 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
endif()
if(NOT WIN32)
- _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
- ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
- libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
- install(CODE ${PNG_SHARED_INSTALL_CODE})
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ IF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
+ install(CODE ${PNG_SHARED_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ELSE(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
+ ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+ libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
+ install(CODE ${PNG_SHARED_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ENDIF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
endif()
endif()
@@ -314,13 +327,23 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT WIN32 OR CYGWIN)
- _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
- ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
- libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
- install(CODE ${PNG_STATIC_INSTALL_CODE})
- install(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ IF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
+${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+ ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
+ install(CODE ${PNG_STATIC_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ELSE(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
+ ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+ libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
+ install(CODE ${PNG_STATIC_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ENDIF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
endif()
endif()
endif()
@@ -358,7 +381,7 @@ if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
-# what's with libpng.txt and all the extra files?
+# what's with libpng-manual.txt and all the extra files?
# UNINSTALL
diff --git a/INSTALL b/INSTALL
index 70fd4bf6b..d95fddbfd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.4.5 - December 9, 2010
+Installing libpng version 1.4.6 - April 8, 2011
On Unix/Linux and similar systems, you can simply type
@@ -46,7 +46,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.4.5" or "libpng14" and "zlib-1.2.3"
+might be called "libpng-1.4.6" or "libpng14" and "zlib-1.2.3"
or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
diff --git a/LICENSE b/LICENSE
index 734398fc5..e5ea84420 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are
+libpng versions 1.2.6, August 15, 2004, through 1.4.6, April 8, 2011, are
Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-December 9, 2010
+April 8, 2011
diff --git a/README b/README
index 9500f3a51..96715a575 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.4.5 - December 9, 2010 (shared library 14.0)
+README for libpng version 1.4.6 - April 8, 2011 (shared library 14.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -185,9 +185,9 @@ Files in this distribution:
makefile.std => Generic UNIX makefile (cc, creates static
libpng.a)
makefile.elf => Linux/ELF makefile symbol versioning,
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -209,12 +209,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.so9 => Solaris 9 makefile
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
diff --git a/configure b/configure
index 6077d75dd..5f87de25b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for libpng 1.4.5.
+# Generated by GNU Autoconf 2.65 for libpng 1.4.6.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@@ -562,8 +562,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.4.5'
-PACKAGE_STRING='libpng 1.4.5'
+PACKAGE_VERSION='1.4.6'
+PACKAGE_STRING='libpng 1.4.6'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL=''
@@ -1292,7 +1292,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libpng 1.4.5 to adapt to many kinds of systems.
+\`configure' configures libpng 1.4.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1362,7 +1362,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libpng 1.4.5:";;
+ short | recursive ) echo "Configuration of libpng 1.4.6:";;
esac
cat <<\_ACEOF
@@ -1467,7 +1467,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libpng configure 1.4.5
+libpng configure 1.4.6
generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -1892,7 +1892,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libpng $as_me 1.4.5, which was
+It was created by libpng $as_me 1.4.6, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2700,7 +2700,7 @@ fi
# Define the identity of the package.
PACKAGE='libpng'
- VERSION='1.4.5'
+ VERSION='1.4.6'
cat >>confdefs.h <<_ACEOF
@@ -2764,10 +2764,10 @@ fi
-PNGLIB_VERSION=1.4.5
+PNGLIB_VERSION=1.4.6
PNGLIB_MAJOR=1
PNGLIB_MINOR=4
-PNGLIB_RELEASE=5
+PNGLIB_RELEASE=6
@@ -12175,7 +12175,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libpng $as_me 1.4.5, which was
+This file was extended by libpng $as_me 1.4.6, which was
generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -12241,7 +12241,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libpng config.status 1.4.5
+libpng config.status 1.4.6
configured by $0, generated by GNU Autoconf 2.65,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index eaca1334d..0f20a8ec0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,17 +16,17 @@ dnl should not be necessary to regenerate configure if the time
dnl stamps are correct
AC_PREREQ(2.59)
-AC_INIT([libpng], [1.4.5], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.4.6], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
dnl Version number stuff here:
-PNGLIB_VERSION=1.4.5
+PNGLIB_VERSION=1.4.6
PNGLIB_MAJOR=1
PNGLIB_MINOR=4
-PNGLIB_RELEASE=5
+PNGLIB_RELEASE=6
dnl End of version number stuff
diff --git a/contrib/pngminim/decoder/makefile b/contrib/pngminim/decoder/makefile
index 1c8712f87..59e964618 100644
--- a/contrib/pngminim/decoder/makefile
+++ b/contrib/pngminim/decoder/makefile
@@ -34,7 +34,6 @@ all: pngm2pnm$(E)
pngm2pnm$(E): $(OBJS)
$(LD) -o pngm2pnm$(E) $(OBJS)
- strip pngm2pnm$(E)
clean:
$(RM) pngm2pnm$(O)
diff --git a/contrib/pngminim/encoder/makefile b/contrib/pngminim/encoder/makefile
index 10794f975..f0a7642d2 100644
--- a/contrib/pngminim/encoder/makefile
+++ b/contrib/pngminim/encoder/makefile
@@ -32,7 +32,6 @@ all: pnm2pngm$(E)
pnm2pngm$(E): $(OBJS)
$(LD) -o pnm2pngm$(E) $(OBJS)
- strip pnm2pngm$(E)
clean:
$(RM) pnm2pngm$(O)
diff --git a/contrib/pngminim/encoder/pngusr.h b/contrib/pngminim/encoder/pngusr.h
index e4029b5c8..458deb443 100644
--- a/contrib/pngminim/encoder/pngusr.h
+++ b/contrib/pngminim/encoder/pngusr.h
@@ -70,6 +70,6 @@
#define PNG_NO_EASY_ACCESS
#define PNG_NO_USER_LIMITS
#define PNG_NO_SET_USER_LIMITS
-#define PNG_NO_TIME_RFC1143
+#define PNG_NO_TIME_RFC1123
#endif /* MINWRPNGCONF_H */
diff --git a/contrib/pngminim/preader/makefile b/contrib/pngminim/preader/makefile
index 72911bb8d..f1b6ebf1e 100644
--- a/contrib/pngminim/preader/makefile
+++ b/contrib/pngminim/preader/makefile
@@ -50,7 +50,6 @@ all: rpng2-x$(E)
rpng2-x$(E): $(OBJS)
$(LD) -o rpng2-x$(E) $(OBJS) $(LIBS)
- strip rpng2-x$(E)
clean:
$(RM) rpng2-x$(O)
diff --git a/contrib/pngminim/preader/pngusr.h b/contrib/pngminim/preader/pngusr.h
index bacb649b6..46c5e487a 100644
--- a/contrib/pngminim/preader/pngusr.h
+++ b/contrib/pngminim/preader/pngusr.h
@@ -63,6 +63,6 @@
#define PNG_NO_EASY_ACCESS
#define PNG_NO_USER_LIMITS
#define PNG_NO_SET_USER_LIMITS
-#define PNG_NO_TIME_RFC1143
+#define PNG_NO_TIME_RFC1123
#endif /* MINPRDPNGCONF_H */
diff --git a/contrib/pngsuite/README b/contrib/pngsuite/README
index 714d12c64..714baff2b 100644
--- a/contrib/pngsuite/README
+++ b/contrib/pngsuite/README
@@ -1,41 +1,58 @@
pngsuite
--------
-(c) Willem van Schaik, 1999
+(c) Willem van Schaik, 1999, 2011
-Permission to use, copy, and distribute these images for any purpose and
-without fee is hereby granted.
+Permission to use, copy, modify, and distribute these images for any
+purpose and without fee is hereby granted.
-These 15 images are part of the much larger PngSuite test-set of
+The 15 "bas*.png" images are part of the much larger PngSuite test-set of
images, available for developers of PNG supporting software. The
complete set, available at http:/www.schaik.com/pngsuite/, contains
a variety of images to test interlacing, gamma settings, ancillary
chunks, etc.
+The "ft*.png" images are "free/libre" replacements for the transparent
+corresponding t*.png images in the PngSuite.
+
The images in this directory represent the basic PNG color-types:
grayscale (1-16 bit deep), full color (8 or 16 bit), paletted
(1-8 bit) and grayscale or color images with alpha channel. You
can use them to test the proper functioning of PNG software.
- filename depth type
+ filename depth type
------------ ------ --------------
- basn0g01.png 1-bit grayscale
- basn0g02.png 2-bit grayscale
- basn0g04.png 4-bit grayscale
- basn0g08.png 8-bit grayscale
- basn0g16.png 16-bit grayscale
- basn2c08.png 8-bit truecolor
- basn2c16.png 16-bit truecolor
- basn3p01.png 1-bit paletted
- basn3p02.png 2-bit paletted
- basn3p04.png 4-bit paletted
- basn3p08.png 8-bit paletted
- basn4a08.png 8-bit gray with alpha
- basn4a16.png 16-bit gray with alpha
- basn6a08.png 8-bit RGBA
- basn6a16.png 16-bit RGBA
+ basn0g01.png 1-bit grayscale
+ basn0g02.png 2-bit grayscale
+ basn0g04.png 4-bit grayscale
+ basn0g08.png 8-bit grayscale
+ basn0g16.png 16-bit grayscale
+ basn2c08.png 8-bit truecolor
+ basn2c16.png 16-bit truecolor
+ basn3p01.png 1-bit paletted
+ basn3p02.png 2-bit paletted
+ basn3p04.png 4-bit paletted
+ basn3p08.png 8-bit paletted
+ basn4a08.png 8-bit gray with alpha
+ basn4a16.png 16-bit gray with alpha
+ basn6a08.png 8-bit RGBA
+ basn6a16.png 16-bit RGBA
+
+ ftbbn0g04.png 4-bit grayscale, black bKGD
+ ftbbn2c16.png 16-bit truecolor, black bKGD
+ ftbbn3p08.png 8-bit paletted, black bKGD
+ ftbgn2c16.png 16-bit truecolor, gray bKGD
+ ftbgn3p08.png 8-bit paletted, gray bKGD
+ ftbrn2c08.png 8-bit truecolor, red bKGD
+ ftbwn0g16.png 16-bit gray, white bKGD
+ ftbwn3p08.png 8-bit paletted, white bKGD
+ ftbyn3p08.png 8-bit paletted, yellow bKGD
+ ftp0n0g08.png 8-bit grayscale, opaque
+ ftp0n2c08.png 8-bit truecolor, opaque
+ ftp0n3p08.png 8-bit paletted, opaque
+ ftp1n3p08.png 8-bit paletted, no bKGD
-Here is the correct result of typing "pngtest -m *.png" in
+Here is the correct result of typing "pngtest -m bas*.png" in
this directory:
Testing basn0g01.png: PASS (524 zero samples)
diff --git a/libpng-1.4.5.txt b/libpng-1.4.6.txt
index d216709d8..4a4891aa4 100644
--- a/libpng-1.4.5.txt
+++ b/libpng-1.4.6.txt
@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
- libpng version 1.4.5 - December 9, 2010
+ libpng version 1.4.6 - April 8, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.4.5 - December 9, 2010
+ libpng versions 0.97, January 1998, through 1.4.6 - April 8, 2011
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@@ -278,7 +278,7 @@ Setting up callback code
You can set up a callback function to handle any unknown chunks in the
input stream. You must supply the function
- read_chunk_callback(png_ptr ptr,
+ read_chunk_callback(png_structp png_ptr,
png_unknown_chunkp chunk);
{
/* The unknown chunk structure contains your
@@ -324,8 +324,8 @@ called after each row has been read, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void read_row_callback(png_ptr ptr, png_uint_32 row,
- int pass);
+ void read_row_callback(png_structp png_ptr,
+ png_uint_32 row, int pass);
{
/* put your code here */
}
@@ -576,15 +576,17 @@ in until png_read_end() has read the chunk data following the image.
PNG_COLOR_MASK_COLOR
PNG_COLOR_MASK_ALPHA
+ interlace_type - (PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7)
+
+ compression_type - (must be PNG_COMPRESSION_TYPE_BASE
+ for PNG 1.0)
+
filter_method - (must be PNG_FILTER_TYPE_BASE
for PNG 1.0, and can also be
PNG_INTRAPIXEL_DIFFERENCING if
the PNG datastream is embedded in
a MNG-1.0 datastream)
- compression_type - (must be PNG_COMPRESSION_TYPE_BASE
- for PNG 1.0)
- interlace_type - (PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7)
Any or all of interlace_type, compression_type, or
filter_method can be NULL if you are
@@ -605,11 +607,11 @@ in until png_read_end() has read the chunk data following the image.
info_ptr);
color_type = png_get_color_type(png_ptr,
info_ptr);
- filter_method = png_get_filter_type(png_ptr,
+ interlace_type = png_get_interlace_type(png_ptr,
info_ptr);
compression_type = png_get_compression_type(png_ptr,
info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
+ filter_method = png_get_filter_type(png_ptr,
info_ptr);
channels = png_get_channels(png_ptr, info_ptr);
@@ -658,14 +660,14 @@ pointer into the info_ptr is returned for any complex types.
png_get_iCCP(png_ptr, info_ptr, &name,
&compression_type, &profile, &proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ name - The profile name.
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
sig_bit - the number of significant bits for
@@ -678,11 +680,11 @@ pointer into the info_ptr is returned for any complex types.
&num_trans, &trans_color);
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
trans_color - graylevel or color sample values of
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
png_get_hIST(png_ptr, info_ptr, &hist);
(PNG_INFO_hIST)
@@ -903,7 +905,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.4.5, not all possible expansions are supported.
+As of libpng version 1.4.6, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -1233,8 +1235,8 @@ with
You must supply the function
- void read_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void read_transform_fn(png_structp png_ptr, png_row_infop
+ row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
after all of the other transformations have been processed.
@@ -1757,7 +1759,7 @@ called after each row has been written, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void write_row_callback(png_ptr, png_uint_32 row,
+ void write_row_callback(png_structp png_ptr, png_uint_32 row,
int pass);
{
/* put your code here */
@@ -1932,14 +1934,14 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_iCCP(png_ptr, info_ptr, name, compression_type,
profile, proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ name - The profile name.
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
png_set_sBIT(png_ptr, info_ptr, sig_bit);
sig_bit - the number of significant bits for
@@ -2314,7 +2316,7 @@ with
You must supply the function
- void write_transform_fn(png_ptr ptr, row_info_ptr
+ void write_transform_fn(png_structp png_ptr, png_row_infop
row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
@@ -3155,7 +3157,8 @@ The png_zalloc() function no longer zeroes out the memory that it
allocates.
Support for dithering was disabled by default in libpng-1.4.0, because
-been well tested and doesn't actually "dither". The code was not
+it has not been well tested and doesn't actually "dither".
+The code was not
removed, however, and could be enabled by building libpng with
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
was reenabled, but the function was renamed png_set_quantize() to
@@ -3278,9 +3281,10 @@ above the comment that says
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-The names of all exported functions and variables begin
-with "png_", and all publicly visible C preprocessor
-macros begin with "PNG_".
+To avoid polluting the global namespace, the names of all exported
+functions and variables begin with "png_", and all publicly visible C
+preprocessor macros begin with "PNG_". We request that applications that
+use libpng *not* begin any of their own symbols with either of these strings.
We put a space after each comma and after each semicolon
in "for" statments, and we put spaces before and after each
@@ -3303,13 +3307,13 @@ Other rules can be inferred by inspecting the libpng source.
XIII. Y2K Compliance in libpng
-December 9, 2010
+April 8, 2011
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.4.5 are Y2K compliant. It is my belief that earlier
+upward through 1.4.6 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
diff --git a/libpng.3 b/libpng.3
index da177d9c9..1fe3461c7 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "December 9, 2010"
+.TH LIBPNG 3 "April 8, 2011"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.6
.SH SYNOPSIS
\fI\fB
@@ -12,7 +12,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
+\fBvoid png_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_voidp png_calloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
@@ -48,7 +56,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_structp png_create_read_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBpng_structp png_create_read_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fI\fB
@@ -56,7 +64,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBpng_structp png_create_write_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_data_freer (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIfreer\fP\fB, png_uint_32 \fImask)\fP\fB);\fP
\fI\fB
@@ -72,6 +84,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_err (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
\fI\fB
@@ -84,7 +100,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_free_default(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
+\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
\fI\fB
@@ -92,75 +108,81 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_bit_depth (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_bKGD (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP
+\fBpng_byte png_get_channels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_channels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_cHRM (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP
+\fBpng_uint_32 png_get_cHRM_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP
+\fBpng_uint_32 png_get_chunk_cache_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_chunk_cache_max (png_structp \fIpng_ptr\fP\fB);\fP
+\fI\fB
+
+\fBpng_alloc_size_t png_get_chunk_malloc_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_color_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_compression_buffer_size (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_compression_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_copyright (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_error_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_voidp png_get_error_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_filter_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_filter_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP
+\fBpng_uint_32 png_get_gAMA (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP
+\fBpng_uint_32 png_get_gAMA_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_header_ver (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_header_ver (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_header_version (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
+\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_charpp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
+\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
\fI\fB
@@ -168,11 +190,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_uint_32 png_get_image_height (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_image_height (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_image_width (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -180,7 +202,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_interlace_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_const_bytep png_get_io_chunk_name (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -188,81 +214,105 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_byte png_get_libpng_ver (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_io_state (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_alloc_size_t png_get_chunk_malloc_max (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
+\fBpng_uint_32 png_get_oFFs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP
+\fBpng_uint_32 png_get_pCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
+\fBpng_uint_32 png_get_pHYs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBfloat png_get_pixel_aspect_ratio (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBfloat png_get_pixel_aspect_ratio (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_pHYs_dpi (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_progressive_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_fixed_point png_get_pixel_aspect_ratio_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP
+\fBpng_uint_32 png_get_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_rgb_to_gray_status (png_structp \fIpng_ptr)
+\fBpng_uint_32 png_get_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
-\fBpng_uint_32 png_get_rowbytes (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_voidp png_get_progressive_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_bytepp png_get_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_PLTE (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP
+\fBpng_byte png_get_rgb_to_gray_status (png_const_structp \fIpng_ptr)
+
+\fBpng_uint_32 png_get_rowbytes (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_bytep png_get_signature (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_bytepp png_get_rows (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_sBIT (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP
+\fBvoid png_get_sCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, double* \fP\fIwidth\fP\fB, double* \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP
+\fBvoid png_get_sCAL_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_fixed_pointp \fP\fIwidth\fP\fB, png_fixed_pointp \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP
+\fBvoid png_get_sCAL_s (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_charpp \fP\fIwidth\fP\fB, png_charpp \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
+\fBpng_bytep png_get_signature (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_sPLT (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_text (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_tIME (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_tRNS (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans_alpha\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
\fI\fB
@@ -272,7 +322,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_uint_32 png_get_uint_31 (png_bytep \fIbuf\fP\fB);\fP
+\fBpng_uint_32 png_get_uint_31 (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIbuf\fP\fB);\fP
\fI\fB
@@ -282,51 +332,75 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
+\fBpng_uint_32 png_get_unknown_chunks (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_user_chunk_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_voidp png_get_user_chunk_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_user_height_max( png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_user_height_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_user_transform_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_voidp png_get_user_transform_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_user_width_max (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_user_width_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_valid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP
+\fBpng_uint_32 png_get_valid (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_x_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBfloat png_get_x_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_x_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_fixed_point png_get_x_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_x_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_int_32 png_get_x_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_y_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_int_32 png_get_x_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_y_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_x_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_x_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBfloat png_get_y_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_fixed_point png_get_y_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_int_32 png_get_y_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_int_32 png_get_y_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_y_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_y_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -334,6 +408,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
\fI\fB
@@ -342,15 +420,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
+\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP
+\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP
+\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP
\fI\fB
@@ -390,7 +468,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
+\fBint png_reset_zstream (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
\fI\fB
@@ -410,6 +492,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_set_background_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, png_uint_32 \fIbackground_gamma\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -462,7 +552,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_expand_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -478,6 +568,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_set_filter_heuristics_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_fixed_point_p \fP\fIfilter_weights\fP\fB, png_fixed_point_p \fIfilter_costs\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP
\fI\fB
@@ -486,6 +580,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_set_gamma_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIscreen_gamma\fP\fB, png_uint_32 \fIdefault_file_gamma\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
\fI\fB
@@ -494,7 +592,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -506,7 +604,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
+\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
\fI\fB
@@ -542,7 +640,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBvoid png_set_compression_buffer_size (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_mem_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fI\fB
@@ -558,7 +660,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_palette_to_rgb(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_palette_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -590,6 +692,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP
\fI\fB
@@ -598,7 +704,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_fixed_point \fP\fIred\fP\fB, png_fixed_point \fIgreen\fP\fB);\fP
+\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_uint_32 \fP\fIred\fP\fB, png_uint_32 \fIgreen\fP\fB);\fP
\fI\fB
@@ -610,7 +716,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
+\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_sCAL_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_fixed_point \fP\fIwidth\fP\fB, png_fixed_point \fIheight\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP
\fI\fB
@@ -642,6 +756,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
+\fBvoid png_set_strip_error_numbers (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIstrip_mode\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -658,11 +776,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
+\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans_alpha\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
\fI\fB
-\fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_tRNS_to_alpha (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -670,11 +788,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_unknown_chunk_location(png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP
+\fBvoid png_set_unknown_chunk_location (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP
\fI\fB
@@ -698,10 +812,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
\fI\fB
-\fBvoid png_set_compression_buffer_size(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP
\fI\fB
@@ -781,11 +891,11 @@ library supports encoding, decoding, and various manipulations of
the Portable Network Graphics (PNG) format image files. It uses the
.IR zlib(3)
compression library.
-Following is a copy of the libpng.txt file that accompanies libpng.
+Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
- libpng version 1.4.5 - December 9, 2010
+ libpng version 1.4.6 - April 8, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@@ -796,7 +906,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.4.5 - December 9, 2010
+ libpng versions 0.97, January 1998, through 1.4.6 - April 8, 2011
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2010 Glenn Randers-Pehrson
@@ -1063,7 +1173,7 @@ instead of setting a flag to be acted upon later.
You can set up a callback function to handle any unknown chunks in the
input stream. You must supply the function
- read_chunk_callback(png_ptr ptr,
+ read_chunk_callback(png_structp png_ptr,
png_unknown_chunkp chunk);
{
/* The unknown chunk structure contains your
@@ -1109,8 +1219,8 @@ called after each row has been read, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void read_row_callback(png_ptr ptr, png_uint_32 row,
- int pass);
+ void read_row_callback(png_structp png_ptr,
+ png_uint_32 row, int pass);
{
/* put your code here */
}
@@ -1361,15 +1471,17 @@ in until png_read_end() has read the chunk data following the image.
PNG_COLOR_MASK_COLOR
PNG_COLOR_MASK_ALPHA
+ interlace_type - (PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7)
+
+ compression_type - (must be PNG_COMPRESSION_TYPE_BASE
+ for PNG 1.0)
+
filter_method - (must be PNG_FILTER_TYPE_BASE
for PNG 1.0, and can also be
PNG_INTRAPIXEL_DIFFERENCING if
the PNG datastream is embedded in
a MNG-1.0 datastream)
- compression_type - (must be PNG_COMPRESSION_TYPE_BASE
- for PNG 1.0)
- interlace_type - (PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7)
Any or all of interlace_type, compression_type, or
filter_method can be NULL if you are
@@ -1390,11 +1502,11 @@ in until png_read_end() has read the chunk data following the image.
info_ptr);
color_type = png_get_color_type(png_ptr,
info_ptr);
- filter_method = png_get_filter_type(png_ptr,
+ interlace_type = png_get_interlace_type(png_ptr,
info_ptr);
compression_type = png_get_compression_type(png_ptr,
info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
+ filter_method = png_get_filter_type(png_ptr,
info_ptr);
channels = png_get_channels(png_ptr, info_ptr);
@@ -1443,14 +1555,14 @@ pointer into the info_ptr is returned for any complex types.
png_get_iCCP(png_ptr, info_ptr, &name,
&compression_type, &profile, &proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ name - The profile name.
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
sig_bit - the number of significant bits for
@@ -1463,11 +1575,11 @@ pointer into the info_ptr is returned for any complex types.
&num_trans, &trans_color);
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
trans_color - graylevel or color sample values of
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
png_get_hIST(png_ptr, info_ptr, &hist);
(PNG_INFO_hIST)
@@ -1688,7 +1800,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.4.5, not all possible expansions are supported.
+As of libpng version 1.4.6, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -2018,8 +2130,8 @@ with
You must supply the function
- void read_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void read_transform_fn(png_structp png_ptr, png_row_infop
+ row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
after all of the other transformations have been processed.
@@ -2542,7 +2654,7 @@ called after each row has been written, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void write_row_callback(png_ptr, png_uint_32 row,
+ void write_row_callback(png_structp png_ptr, png_uint_32 row,
int pass);
{
/* put your code here */
@@ -2717,14 +2829,14 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_iCCP(png_ptr, info_ptr, name, compression_type,
profile, proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ name - The profile name.
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+ proflen - length of profile data in bytes.
png_set_sBIT(png_ptr, info_ptr, sig_bit);
sig_bit - the number of significant bits for
@@ -3099,7 +3211,7 @@ with
You must supply the function
- void write_transform_fn(png_ptr ptr, row_info_ptr
+ void write_transform_fn(png_structp png_ptr, png_row_infop
row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
@@ -3940,7 +4052,8 @@ The png_zalloc() function no longer zeroes out the memory that it
allocates.
Support for dithering was disabled by default in libpng-1.4.0, because
-been well tested and doesn't actually "dither". The code was not
+it has not been well tested and doesn't actually "dither".
+The code was not
removed, however, and could be enabled by building libpng with
PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
was reenabled, but the function was renamed png_set_quantize() to
@@ -4063,9 +4176,10 @@ above the comment that says
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-The names of all exported functions and variables begin
-with "png_", and all publicly visible C preprocessor
-macros begin with "PNG_".
+To avoid polluting the global namespace, the names of all exported
+functions and variables begin with "png_", and all publicly visible C
+preprocessor macros begin with "PNG_". We request that applications that
+use libpng *not* begin any of their own symbols with either of these strings.
We put a space after each comma and after each semicolon
in "for" statments, and we put spaces before and after each
@@ -4088,13 +4202,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
-December 9, 2010
+April 8, 2011
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.4.5 are Y2K compliant. It is my belief that earlier
+upward through 1.4.6 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -4286,6 +4400,9 @@ the first widely used release:
1.4.5beta05-07 14 10405 14.so.14.5[.0]
1.4.5rc02-03 14 10405 14.so.14.5[.0]
1.4.5 14 10405 14.so.14.5[.0]
+ 1.4.6beta01-07 14 10406 14.so.14.6[.0]
+ 1.4.6rc01 14 10406 14.so.14.6[.0]
+ 1.4.6 14 10406 14.so.14.6[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -4341,7 +4458,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.4.5 - December 9, 2010:
+Libpng version 1.4.6 - April 8, 2011:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -4364,7 +4481,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are
+libpng versions 1.2.6, August 15, 2004, through 1.4.6, April 8, 2011, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -4463,7 +4580,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-December 9, 2010
+April 8, 2011
.\" end of man page
diff --git a/libpngpf.3 b/libpngpf.3
index 32b4ab623..29ec5f959 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "December 9, 2010"
+.TH LIBPNGPF 3 "April 8, 2011"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.5
+libpng \- Portable Network Graphics (PNG) Reference Library 1.4.6
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
diff --git a/png.5 b/png.5
index 5c265f5c6..b1382cd02 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "December 9, 2010"
+.TH PNG 5 "April 8, 2011"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
diff --git a/png.c b/png.c
index 00d258dff..c833e03f8 100644
--- a/png.c
+++ b/png.c
@@ -1,8 +1,8 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.4.2 [May 6, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -17,7 +17,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_5 Your_png_h_is_not_version_1_4_5;
+typedef version_1_4_6 Your_png_h_is_not_version_1_4_6;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -539,21 +539,21 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
png_charp PNGAPI
-png_get_copyright(png_structp png_ptr)
+png_get_copyright(png_const_structp png_ptr)
{
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef PNG_STRING_COPYRIGHT
return PNG_STRING_COPYRIGHT
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
- "libpng version 1.4.5 - December 9, 2010" PNG_STRING_NEWLINE \
+ "libpng version 1.4.6 - April 8, 2011" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
#else
- return ((png_charp) "libpng version 1.4.5 - December 9, 2010\
+ return ((png_charp) "libpng version 1.4.6 - April 8, 2011\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
@@ -570,23 +570,23 @@ png_get_copyright(png_structp png_ptr)
* it is guaranteed that png.c uses the correct version of png.h.
*/
png_charp PNGAPI
-png_get_libpng_ver(png_structp png_ptr)
+png_get_libpng_ver(png_const_structp png_ptr)
{
/* Version of *.c files used when building libpng */
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}
png_charp PNGAPI
-png_get_header_ver(png_structp png_ptr)
+png_get_header_ver(png_const_structp png_ptr)
{
/* Version of *.h files used when building libpng */
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
return ((png_charp) PNG_LIBPNG_VER_STRING);
}
png_charp PNGAPI
-png_get_header_version(png_structp png_ptr)
+png_get_header_version(png_const_structp png_ptr)
{
/* Returns longer string containing both version and date */
png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
diff --git a/png.h b/png.h
index b1f1bc364..b8d6bc55e 100644
--- a/png.h
+++ b/png.h
@@ -1,8 +1,8 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.4.5 - December 9, 2010
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * libpng version 1.4.6 - April 8, 2011
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,7 +11,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.4.5 - December 9, 2010: Glenn
+ * libpng versions 0.97, January 1998, through 1.4.6 - April 8, 2011: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -153,6 +153,9 @@
* 1.4.5beta05-07 14 10405 14.so.14.5[.0]
* 1.4.5rc02-03 14 10405 14.so.14.5[.0]
* 1.4.5 14 10405 14.so.14.5[.0]
+ * 1.4.6beta01-07 14 10406 14.so.14.6[.0]
+ * 1.4.6rc01 14 10406 14.so.14.6[.0]
+ * 1.4.6 14 10406 14.so.14.6[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -184,7 +187,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.4.6, April 8, 2011, are
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -296,13 +299,13 @@
* Y2K compliance in libpng:
* =========================
*
- * December 9, 2010
+ * April 8, 2011
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.4.5 are Y2K compliant. It is my belief that earlier
+ * upward through 1.4.6 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -358,9 +361,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.4.5"
+#define PNG_LIBPNG_VER_STRING "1.4.6"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.4.5 - December 9, 2010\n"
+ " libpng version 1.4.6 - April 8, 2011\n"
#define PNG_LIBPNG_VER_SONUM 14
#define PNG_LIBPNG_VER_DLLNUM 14
@@ -368,7 +371,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 4
-#define PNG_LIBPNG_VER_RELEASE 5
+#define PNG_LIBPNG_VER_RELEASE 6
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
@@ -398,7 +401,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10405 /* 1.4.5 */
+#define PNG_LIBPNG_VER 10406 /* 1.4.6 */
#ifndef PNG_VERSION_INFO_ONLY
/* Include the compression library's header */
@@ -905,6 +908,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
} png_info;
typedef png_info FAR * png_infop;
+typedef PNG_CONST png_info FAR * png_const_infop;
typedef png_info FAR * FAR * png_infopp;
/* Maximum positive integer used in PNG is (2^31)-1 */
@@ -1025,6 +1029,7 @@ typedef png_row_info FAR * FAR * png_row_infopp;
*/
typedef struct png_struct_def png_struct;
typedef png_struct FAR * png_structp;
+typedef PNG_CONST png_struct FAR * png_const_structp;
typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
@@ -1482,7 +1487,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef png_structp version_1_4_5;
+typedef png_structp version_1_4_6;
typedef png_struct FAR * FAR * png_structpp;
@@ -1525,7 +1530,7 @@ PNG_EXPORT(png_structp,png_create_write_struct)
png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
- PNGARG((png_structp png_ptr));
+ PNGARG((png_const_structp png_ptr));
PNG_EXPORT(void,png_set_compression_buffer_size)
PNGARG((png_structp png_ptr, png_size_t size));
@@ -1647,7 +1652,7 @@ PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
#endif
PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
int error_action, png_fixed_point red, png_fixed_point green ));
-PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
+PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_const_structp
png_ptr));
#endif
@@ -1969,7 +1974,7 @@ PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
/* Return the user pointer associated with the error functions */
-PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_const_structp png_ptr));
/* Replace the default data output functions with a user supplied one(s).
* If buffered output is not used, then output_flush_fn can be set to NULL.
@@ -2002,7 +2007,7 @@ PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
/* Return the user pointer associated with the memory functions */
-PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_const_structp png_ptr));
#endif
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
@@ -2022,13 +2027,13 @@ PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
int user_transform_channels));
/* Return the user pointer associated with the user transform functions */
PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
- PNGARG((png_structp png_ptr));
+ PNGARG((png_const_structp png_ptr));
#endif
#ifdef PNG_USER_CHUNKS_SUPPORTED
PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
-PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
+PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_const_structp
png_ptr));
#endif
@@ -2043,7 +2048,7 @@ PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
/* Returns the user pointer associated with the push read functions */
PNG_EXPORT(png_voidp,png_get_progressive_ptr)
- PNGARG((png_structp png_ptr));
+ PNGARG((png_const_structp png_ptr));
/* Function to be called when data becomes available */
PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
@@ -2151,19 +2156,19 @@ PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
* png_info_struct.
*/
/* Returns "flag" if chunk data is valid in info_ptr. */
-PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 flag));
+PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_uint_32 flag));
/* Returns number of bytes needed to hold a transformed row. */
-PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr));
#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Returns row_pointers, which is an array of pointers to scanlines that was
* returned from png_read_png().
*/
-PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Set row_pointers, which is an array of pointers to scanlines for use
* by png_write_png().
*/
@@ -2172,70 +2177,70 @@ PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
#endif
/* Returns number of color channels in image. */
-PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr));
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* Returns image width in pixels. */
-PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image height in pixels. */
-PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image bit_depth. */
-PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image color_type. */
-PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image filter_type. */
-PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image interlace_type. */
-PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image compression_type. */
-PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns image resolution in pixels per meter, from pHYs chunk data. */
-PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
/* Returns pixel aspect ratio, computed from pHYs chunk data. */
#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
#endif
/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
-PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr));
#endif /* PNG_EASY_ACCESS_SUPPORTED */
/* Returns pointer to signature string read from PNG header */
-PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_const_structp png_ptr,
+ png_infop info_ptr));
#ifdef PNG_bKGD_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
+PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_const_structp png_ptr,
png_infop info_ptr, png_color_16p *background));
#endif
@@ -2246,14 +2251,14 @@ PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double *white_x, double *white_y, double *red_x,
+PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, double *white_x, double *white_y, double *red_x,
double *red_y, double *green_x, double *green_y, double *blue_x,
double *blue_y));
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
+PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
*int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
*int_blue_x, png_fixed_point *int_blue_y));
@@ -2277,11 +2282,11 @@ PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double *file_gamma));
+PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, double *file_gamma));
#endif
-PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point *int_file_gamma));
+PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_fixed_point *int_file_gamma));
#endif
#ifdef PNG_gAMA_SUPPORTED
@@ -2294,8 +2299,8 @@ PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_hIST_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_16p *hist));
+PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_uint_16p *hist));
#endif
#ifdef PNG_hIST_SUPPORTED
@@ -2314,8 +2319,8 @@ PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
int filter_method));
#ifdef PNG_oFFs_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
+PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
int *unit_type));
#endif
@@ -2326,8 +2331,8 @@ PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_pCAL_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
+PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
int *type, int *nparams, png_charp *units, png_charpp *params));
#endif
@@ -2338,8 +2343,8 @@ PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_pHYs_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
+PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif
#ifdef PNG_pHYs_SUPPORTED
@@ -2347,14 +2352,14 @@ PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
#endif
-PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_colorp *palette, int *num_palette));
+PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_colorp *palette, int *num_palette));
PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_colorp palette, int num_palette));
#ifdef PNG_sBIT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
+PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_const_structp png_ptr,
png_infop info_ptr, png_color_8p *sig_bit));
#endif
@@ -2364,8 +2369,8 @@ PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_sRGB_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *intent));
+PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, int *intent));
#endif
#ifdef PNG_sRGB_SUPPORTED
@@ -2376,8 +2381,8 @@ PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_iCCP_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charpp name, int *compression_type,
+PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen));
/* Note to maintainer: profile should be png_bytepp */
#endif
@@ -2390,8 +2395,8 @@ PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_sPLT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_sPLT_tpp entries));
+PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_sPLT_tpp entries));
#endif
#ifdef PNG_sPLT_SUPPORTED
@@ -2401,8 +2406,8 @@ PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
#ifdef PNG_TEXT_SUPPORTED
/* png_get_text also returns the number of text chunks in *num_text */
-PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_textp *text_ptr, int *num_text));
+PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, png_textp *text_ptr, int *num_text));
#endif
/* Note while png_set_text() will accept a structure whose text,
@@ -2418,7 +2423,7 @@ PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_tIME_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
+PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_const_structp png_ptr,
png_infop info_ptr, png_timep *mod_time));
#endif
@@ -2428,7 +2433,7 @@ PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
#endif
#ifdef PNG_tRNS_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
+PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_const_structp png_ptr,
png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
png_color_16p *trans_color));
#endif
@@ -2444,12 +2449,12 @@ PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *unit, double *width, double *height));
+PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, int *unit, double *width, double *height));
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
+PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
#endif
#endif
#endif /* PNG_sCAL_SUPPORTED */
@@ -2486,8 +2491,8 @@ PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
PNG_EXPORT(void, png_set_unknown_chunk_location)
PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
-PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
- png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
+PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_const_structp
+ png_ptr, png_const_infop info_ptr, png_unknown_chunkpp entries));
#endif
/* Png_free_data() will turn off the "valid" flag for anything it frees.
@@ -2509,11 +2514,11 @@ PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
png_voidp params));
#endif
-PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
-PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
-PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp
+PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_const_structp png_ptr));
+PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_const_structp png_ptr));
+PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_const_structp
png_ptr));
-PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
+PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_const_structp png_ptr));
#ifdef PNG_MNG_FEATURES_SUPPORTED
PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
@@ -2538,47 +2543,48 @@ PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
-PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
+PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_const_structp
png_ptr));
-PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
+PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_const_structp
png_ptr));
/* Added in libpng-1.4.0 */
PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
png_ptr, png_uint_32 user_chunk_cache_max));
PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
- PNGARG((png_structp png_ptr));
+ PNGARG((png_const_structp png_ptr));
/* Added in libpng-1.4.1 */
PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp
png_ptr, png_alloc_size_t user_chunk_cache_max));
PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max)
- PNGARG((png_structp png_ptr));
+ PNGARG((png_const_structp png_ptr));
#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_pixels_per_inch)
+ PNGARG((png_const_structp png_ptr, png_const_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_x_pixels_per_inch)
+ PNGARG((png_const_structp png_ptr, png_const_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(png_uint_32,png_get_y_pixels_per_inch)
+ PNGARG((png_const_structp png_ptr, png_const_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_x_offset_inches) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr));
-PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_const_structp png_ptr,
+ png_const_infop info_ptr));
#ifdef 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));
+PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_const_structp png_ptr,
+ png_const_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 */
/* Added in libpng-1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr));
+PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_const_structp png_ptr));
PNG_EXPORT(png_bytep,png_get_io_chunk_name)
PNGARG((png_structp png_ptr));
diff --git a/pngconf.h b/pngconf.h
index 8a6d83698..9682ca7c3 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,9 +1,9 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.4.5 - December 9, 2010
+ * libpng version 1.4.6 - April 8, 2011
* For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -84,6 +84,18 @@
/* End of material added to libpng-1.2.8 */
+/* Added at libpng-1.4.6 */
+#ifndef PNG_UNUSED
+/* Unused formal parameter warnings are silenced using the following macro
+ * which is expected to have no bad effects on performance (optimizing
+ * compilers will probably remove it entirely). Note that if you replace
+ * it with something other than whitespace, you must include the terminating
+ * semicolon.
+ */
+# define PNG_UNUSED(param) (void)param;
+#endif
+/* End of material added to libpng-1.4.6 */
+
#ifndef PNG_VERSION_INFO_ONLY
/* This is the size of the compression buffer, and thus the size of
@@ -1380,14 +1392,14 @@ typedef char FAR * FAR * FAR * png_charppp;
# ifndef PNG_ALLOCATED
# define PNG_ALLOCATED __attribute__((__malloc__))
# endif
+# ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED __attribute__((__deprecated__))
+# endif
/* This specifically protects structure members that should only be
* accessed from within the library, therefore should be empty during
* a library build.
*/
-# ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED __attribute__((__deprecated__))
-# endif
# ifndef PNG_DEPSTRUCT
# define PNG_DEPSTRUCT __attribute__((__deprecated__))
# endif
@@ -1401,6 +1413,37 @@ typedef char FAR * FAR * FAR * png_charppp;
# endif
# endif /* PNG_PRIVATE */
# endif /* __GNUC__ */
+
+# if defined(_MSC_VER) && (_MSC_VER >= 1300)
+# ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT /* not supported */
+# endif
+# ifndef PNG_NORETURN
+# define PNG_NORETURN __declspec(noreturn)
+# endif
+# ifndef PNG_PTR_NORETURN
+# define PNG_PTR_NORETURN /* not supported */
+# endif
+# ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED __declspec(restrict)
+# endif
+
+ /* This specifically protects structure members that should only be
+ * accessed from within the library, therefore should be empty during
+ * a library build.
+ */
+# ifndef PNGLIB_BUILD
+# ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED __declspec(deprecated)
+# endif
+# ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT __declspec(deprecated)
+# endif
+# ifndef PNG_PRIVATE
+# define PNG_PRIVATE __declspec(deprecated)
+# endif
+# endif /* PNGLIB_BUILD */
+# endif /* _MSC_VER */
#endif /* PNG_PEDANTIC_WARNINGS */
#ifndef PNG_DEPRECATED
diff --git a/pngerror.c b/pngerror.c
index 633eae29f..c196b11ce 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,8 +1,8 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -306,7 +306,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT();
#ifndef PNG_CONSOLE_IO_SUPPORTED
- error_message = error_message; /* Make compiler happy */
+ PNG_UNUSED(error_message) /* Make compiler happy */
#endif
}
@@ -352,9 +352,9 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
fprintf(stderr, PNG_STRING_NEWLINE);
}
#else
- warning_message = warning_message; /* Make compiler happy */
+ PNG_UNUSED(warning_message) /* Make compiler happy */
#endif
- png_ptr = png_ptr; /* Make compiler happy */
+ PNG_UNUSED(png_ptr) /* Make compiler happy */
}
#endif /* PNG_WARNINGS_SUPPORTED */
@@ -380,7 +380,7 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
-png_get_error_ptr(png_structp png_ptr)
+png_get_error_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return NULL;
diff --git a/pngget.c b/pngget.c
index 9b3a9ccee..ac5e27c33 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.4.2 [May 6, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [April 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -18,7 +18,8 @@
#include "pngpriv.h"
png_uint_32 PNGAPI
-png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
+png_get_valid(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 flag)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->valid & flag);
@@ -28,7 +29,7 @@ png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
}
png_size_t PNGAPI
-png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
+png_get_rowbytes(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->rowbytes);
@@ -39,7 +40,7 @@ png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_INFO_IMAGE_SUPPORTED
png_bytepp PNGAPI
-png_get_rows(png_structp png_ptr, png_infop info_ptr)
+png_get_rows(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->row_pointers);
@@ -52,7 +53,7 @@ png_get_rows(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* Easy access to info, added in libpng-0.99 */
png_uint_32 PNGAPI
-png_get_image_width(png_structp png_ptr, png_infop info_ptr)
+png_get_image_width(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->width;
@@ -61,7 +62,7 @@ png_get_image_width(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_image_height(png_structp png_ptr, png_infop info_ptr)
+png_get_image_height(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->height;
@@ -70,7 +71,7 @@ png_get_image_height(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
+png_get_bit_depth(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->bit_depth;
@@ -79,7 +80,7 @@ png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_color_type(png_structp png_ptr, png_infop info_ptr)
+png_get_color_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->color_type;
@@ -88,7 +89,7 @@ png_get_color_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
+png_get_filter_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->filter_type;
@@ -97,7 +98,7 @@ png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
+png_get_interlace_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->interlace_type;
@@ -106,7 +107,7 @@ png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
+png_get_compression_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->compression_type;
@@ -115,7 +116,7 @@ png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_x_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
@@ -136,7 +137,7 @@ png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_y_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
@@ -157,7 +158,7 @@ png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
@@ -180,7 +181,7 @@ png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_FLOATING_POINT_SUPPORTED
float PNGAPI
-png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
+png_get_pixel_aspect_ratio(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
@@ -204,7 +205,7 @@ png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
#endif
png_int_32 PNGAPI
-png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_oFFs_SUPPORTED
@@ -226,7 +227,7 @@ png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
}
png_int_32 PNGAPI
-png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
@@ -248,7 +249,7 @@ png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
}
png_int_32 PNGAPI
-png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
@@ -270,7 +271,7 @@ png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
}
png_int_32 PNGAPI
-png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
@@ -293,35 +294,35 @@ png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
png_uint_32 PNGAPI
-png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
{
return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
png_uint_32 PNGAPI
-png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_x_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
{
return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
png_uint_32 PNGAPI
-png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_y_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
{
return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr)
*.0254 +.5));
}
float PNGAPI
-png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr)
{
return ((float)png_get_x_offset_microns(png_ptr, info_ptr)
*.00003937);
}
float PNGAPI
-png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr)
{
return ((float)png_get_y_offset_microns(png_ptr, info_ptr)
*.00003937);
@@ -329,7 +330,7 @@ png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
-png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
+png_get_pHYs_dpi(png_const_structp png_ptr, png_const_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
@@ -369,7 +370,7 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
#endif /* PNG_EASY_ACCESS_SUPPORTED */
png_byte PNGAPI
-png_get_channels(png_structp png_ptr, png_infop info_ptr)
+png_get_channels(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->channels);
@@ -378,7 +379,7 @@ png_get_channels(png_structp png_ptr, png_infop info_ptr)
}
png_bytep PNGAPI
-png_get_signature(png_structp png_ptr, png_infop info_ptr)
+png_get_signature(png_const_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->signature);
@@ -388,7 +389,7 @@ png_get_signature(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_bKGD_SUPPORTED
png_uint_32 PNGAPI
-png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
+png_get_bKGD(png_const_structp png_ptr, png_infop info_ptr,
png_color_16p *background)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
@@ -406,7 +407,7 @@ png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
+png_get_cHRM(png_const_structp png_ptr, png_const_infop info_ptr,
double *white_x, double *white_y, double *red_x, double *red_y,
double *green_x, double *green_y, double *blue_x, double *blue_y)
{
@@ -437,7 +438,7 @@ png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
+png_get_cHRM_fixed(png_const_structp png_ptr, png_const_infop info_ptr,
png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
png_fixed_point *blue_x, png_fixed_point *blue_y)
@@ -472,7 +473,7 @@ png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
+png_get_gAMA(png_const_structp png_ptr, png_const_infop info_ptr, double *file_gamma)
{
png_debug1(1, "in %s retrieval function", "gAMA");
@@ -487,7 +488,7 @@ png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
+png_get_gAMA_fixed(png_const_structp png_ptr, png_const_infop info_ptr,
png_fixed_point *int_file_gamma)
{
png_debug1(1, "in %s retrieval function", "gAMA");
@@ -505,7 +506,8 @@ png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sRGB_SUPPORTED
png_uint_32 PNGAPI
-png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
+png_get_sRGB(png_const_structp png_ptr, png_const_infop info_ptr,
+ int *file_srgb_intent)
{
png_debug1(1, "in %s retrieval function", "sRGB");
@@ -521,7 +523,7 @@ png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
#ifdef PNG_iCCP_SUPPORTED
png_uint_32 PNGAPI
-png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
+png_get_iCCP(png_const_structp png_ptr, png_const_infop info_ptr,
png_charpp name, int *compression_type,
png_charpp profile, png_uint_32 *proflen)
{
@@ -545,7 +547,7 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sPLT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
+png_get_sPLT(png_const_structp png_ptr, png_const_infop info_ptr,
png_sPLT_tpp spalettes)
{
if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
@@ -559,7 +561,8 @@ png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_hIST_SUPPORTED
png_uint_32 PNGAPI
-png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
+png_get_hIST(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_16p *hist)
{
png_debug1(1, "in %s retrieval function", "hIST");
@@ -614,7 +617,7 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_oFFs_SUPPORTED
png_uint_32 PNGAPI
-png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
+png_get_oFFs(png_const_structp png_ptr, png_const_infop info_ptr,
png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
@@ -633,7 +636,7 @@ png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_pCAL_SUPPORTED
png_uint_32 PNGAPI
-png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
+png_get_pCAL(png_const_structp png_ptr, png_const_infop info_ptr,
png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
png_charp *units, png_charpp *params)
{
@@ -659,7 +662,7 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sCAL_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
+png_get_sCAL(png_const_structp png_ptr, png_const_infop info_ptr,
int *unit, double *width, double *height)
{
if (png_ptr != NULL && info_ptr != NULL &&
@@ -675,7 +678,7 @@ png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
+png_get_sCAL_s(png_const_structp png_ptr, png_const_infop info_ptr,
int *unit, png_charpp width, png_charpp height)
{
if (png_ptr != NULL && info_ptr != NULL &&
@@ -694,7 +697,7 @@ png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
-png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
+png_get_pHYs(png_const_structp png_ptr, png_const_infop info_ptr,
png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
@@ -727,7 +730,8 @@ png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
#endif
png_uint_32 PNGAPI
-png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
+png_get_PLTE(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_colorp *palette,
int *num_palette)
{
png_debug1(1, "in %s retrieval function", "PLTE");
@@ -745,7 +749,8 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
#ifdef PNG_sBIT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
+png_get_sBIT(png_const_structp png_ptr, png_infop info_ptr,
+ png_color_8p *sig_bit)
{
png_debug1(1, "in %s retrieval function", "sBIT");
@@ -761,8 +766,8 @@ png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
#ifdef PNG_TEXT_SUPPORTED
png_uint_32 PNGAPI
-png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
- int *num_text)
+png_get_text(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_textp *text_ptr, int *num_text)
{
if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
{
@@ -786,7 +791,8 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
#ifdef PNG_tIME_SUPPORTED
png_uint_32 PNGAPI
-png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
+png_get_tIME(png_const_structp png_ptr, png_infop info_ptr,
+ png_timep *mod_time)
{
png_debug1(1, "in %s retrieval function", "tIME");
@@ -802,7 +808,7 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
#ifdef PNG_tRNS_SUPPORTED
png_uint_32 PNGAPI
-png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
+png_get_tRNS(png_const_structp png_ptr, png_infop info_ptr,
png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
{
png_uint_32 retval = 0;
@@ -844,7 +850,7 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
png_uint_32 PNGAPI
-png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
+png_get_unknown_chunks(png_const_structp png_ptr, png_const_infop info_ptr,
png_unknown_chunkpp unknowns)
{
if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
@@ -858,7 +864,7 @@ png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte PNGAPI
-png_get_rgb_to_gray_status(png_structp png_ptr)
+png_get_rgb_to_gray_status(png_const_structp png_ptr)
{
return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
}
@@ -866,14 +872,14 @@ png_get_rgb_to_gray_status(png_structp png_ptr)
#ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp PNGAPI
-png_get_user_chunk_ptr(png_structp png_ptr)
+png_get_user_chunk_ptr(png_const_structp png_ptr)
{
return (png_ptr? png_ptr->user_chunk_ptr : NULL);
}
#endif
png_size_t PNGAPI
-png_get_compression_buffer_size(png_structp png_ptr)
+png_get_compression_buffer_size(png_const_structp png_ptr)
{
return (png_ptr ? png_ptr->zbuf_size : 0L);
}
@@ -883,24 +889,24 @@ png_get_compression_buffer_size(png_structp png_ptr)
/* These functions were added to libpng 1.2.6 and were enabled
* by default in libpng-1.4.0 */
png_uint_32 PNGAPI
-png_get_user_width_max(png_structp png_ptr)
+png_get_user_width_max(png_const_structp png_ptr)
{
return (png_ptr? png_ptr->user_width_max : 0);
}
png_uint_32 PNGAPI
-png_get_user_height_max(png_structp png_ptr)
+png_get_user_height_max(png_const_structp png_ptr)
{
return (png_ptr? png_ptr->user_height_max : 0);
}
/* This function was added to libpng 1.4.0 */
png_uint_32 PNGAPI
-png_get_chunk_cache_max(png_structp png_ptr)
+png_get_chunk_cache_max(png_const_structp png_ptr)
{
return (png_ptr? png_ptr->user_chunk_cache_max : 0);
}
/* This function was added to libpng 1.4.1 */
png_alloc_size_t PNGAPI
-png_get_chunk_malloc_max(png_structp png_ptr)
+png_get_chunk_malloc_max(png_const_structp png_ptr)
{
return (png_ptr?
png_ptr->user_chunk_malloc_max : 0);
@@ -910,7 +916,7 @@ png_get_chunk_malloc_max(png_structp png_ptr)
/* These functions were added to libpng 1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
png_uint_32 PNGAPI
-png_get_io_state(png_structp png_ptr)
+png_get_io_state(png_const_structp png_ptr)
{
return png_ptr->io_state;
}
diff --git a/pngmem.c b/pngmem.c
index c8a3f6f59..4f00cffad 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.4.2 [May 6, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [April 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -601,7 +601,7 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
-png_get_mem_ptr(png_structp png_ptr)
+png_get_mem_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
diff --git a/pngpread.c b/pngpread.c
index 9c69a89d1..a2d8dbf6e 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,8 +1,8 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.4.3 [June 26, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -1204,7 +1204,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place tEXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@@ -1302,7 +1302,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place zTXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@@ -1503,7 +1503,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
png_error(png_ptr, "Out of place iTXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
}
#ifdef PNG_MAX_MALLOC_64K
@@ -1637,8 +1637,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
)
#endif
png_chunk_error(png_ptr, "unknown critical chunk");
-
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
}
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
@@ -1757,7 +1756,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
}
png_voidp PNGAPI
-png_get_progressive_ptr(png_structp png_ptr)
+png_get_progressive_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
diff --git a/pngpriv.h b/pngpriv.h
index 7112c8da1..aa134b55c 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1,9 +1,9 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * libpng version 1.4.5 - December 9, 2010
+ * libpng version 1.4.6 - April 8, 2011
* For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
diff --git a/pngread.c b/pngread.c
index 480644807..7d6b76a9d 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,8 +1,8 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -439,10 +439,12 @@ void PNGAPI
png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
PNG_IDAT;
+#ifdef PNG_READ_INTERLACING_SUPPORTED
PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
0xff};
PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
int ret;
+#endif
if (png_ptr == NULL)
return;
@@ -1337,8 +1339,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
- transforms = transforms; /* Quiet compiler warnings */
- params = params;
+ PNG_UNUSED(transforms) /* Quiet compiler warnings */
+ PNG_UNUSED(params)
}
#endif /* PNG_INFO_IMAGE_SUPPORTED */
diff --git a/pngrio.c b/pngrio.c
index cab7114a9..710f4f0f4 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,8 +1,8 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [January 14, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
diff --git a/pngrtran.c b/pngrtran.c
index 449751431..a475f9a9a 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [%RDATE%]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -1008,7 +1008,7 @@ png_init_read_transformations(png_structp png_ptr)
*/
png_ptr->transformations &= ~PNG_BACKGROUND;
png_ptr->transformations &= ~PNG_GAMMA;
- png_ptr->transformations |= PNG_STRIP_ALPHA;
+ png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
else
@@ -1131,7 +1131,7 @@ png_init_read_transformations(png_structp png_ptr)
/* Handled alpha, still need to strip the channel. */
png_ptr->transformations &= ~PNG_BACKGROUND;
- png_ptr->transformations |= PNG_STRIP_ALPHA;
+ png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
@@ -2290,7 +2290,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_debug(1, "in png_do_rgb_to_gray");
- if (
+ if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) &&
(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
diff --git a/pngrutil.c b/pngrutil.c
index 5429887a5..113589c69 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -138,7 +138,7 @@ png_read_chunk_header(png_structp png_ptr)
png_memcpy(png_ptr->chunk_name, buf + 4, 4);
png_debug2(0, "Reading %s chunk, length = %lu",
- png_ptr->chunk_name, length);
+ png_ptr->chunk_name, (unsigned long)length);
/* Reset the crc and run it over the chunk name. */
png_reset_crc(png_ptr);
@@ -703,7 +703,7 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_finish(png_ptr, length);
- info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
+ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
}
#ifdef PNG_READ_gAMA_SUPPORTED
@@ -1216,9 +1216,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_bytep entry_start;
png_sPLT_t new_palette;
-#ifdef PNG_POINTER_INDEXING_SUPPORTED
png_sPLT_entryp pp;
-#endif
int data_length, entry_size, i;
png_uint_32 skip = 0;
png_size_t slength;
@@ -1357,7 +1355,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
pp[i].blue = png_get_uint_16(entry_start); entry_start += 2;
pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
}
- pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
+ pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2;
}
#endif
@@ -1726,7 +1724,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)",
- length + 1);
+ (unsigned long)(length + 1));
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
@@ -1864,7 +1862,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)",
- length + 1);
+ (unsigned long)(length + 1));
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
if (png_ptr->chunkdata == NULL)
{
@@ -2505,7 +2503,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, skip);
#ifndef PNG_READ_USER_CHUNKS_SUPPORTED
- info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
+ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
#endif
}
@@ -2961,7 +2959,7 @@ png_do_read_interlace(png_structp png_ptr)
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);
}
#ifndef PNG_READ_PACKSWAP_SUPPORTED
- transformations = transformations; /* Silence compiler warning */
+ PNG_UNUSED(transformations) /* Silence compiler warning */
#endif
}
#endif /* PNG_READ_INTERLACING_SUPPORTED */
@@ -2971,7 +2969,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
png_bytep prev_row, int filter)
{
png_debug(1, "in png_read_filter_row");
- png_debug2(2, "row = %lu, filter = %d", png_ptr->row_number, filter);
+ png_debug2(2, "row = %lu, filter = %d",
+ (unsigned long)png_ptr->row_number, filter);
switch (filter)
{
case PNG_FILTER_VALUE_NONE:
@@ -3412,13 +3411,13 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
- png_debug1(3, "width = %lu,", png_ptr->width);
- png_debug1(3, "height = %lu,", png_ptr->height);
- png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
- png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
- png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
+ png_debug1(3, "width = %lu,", (unsigned long)png_ptr->width);
+ png_debug1(3, "height = %lu,", (unsigned long)png_ptr->height);
+ png_debug1(3, "iwidth = %lu,", (unsigned long)png_ptr->iwidth);
+ png_debug1(3, "num_rows = %lu,", (unsigned long)png_ptr->num_rows);
+ png_debug1(3, "rowbytes = %lu,", (unsigned long)png_ptr->rowbytes);
png_debug1(3, "irowbytes = %lu",
- PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
+ (unsigned long)PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
diff --git a/pngset.c b/pngset.c
index 76f173e4e..d568c53f8 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,8 +1,8 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [January 14, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
diff --git a/pngtest.c b/pngtest.c
index 1481104b8..0c822acdb 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,8 +1,8 @@
/* pngtest.c - a simple test program to test libpng
*
- * Last changed in libpng 1.4.5 [December 9, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -387,7 +387,7 @@ static void
pngtest_flush(png_structp png_ptr)
{
/* Do nothing; fflush() is said to be just a waste of energy. */
- png_ptr = png_ptr; /* Stifle compiler warning */
+ PNG_UNUSED(png_ptr) /* Stifle compiler warning */
}
#endif
@@ -1687,4 +1687,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_5 your_png_h_is_not_version_1_4_5;
+typedef version_1_4_6 your_png_h_is_not_version_1_4_6;
diff --git a/pngtrans.c b/pngtrans.c
index 741daf45b..8068e902e 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.4.2 [April 29, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [April 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -662,7 +662,7 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
* are called.
*/
png_voidp PNGAPI
-png_get_user_transform_ptr(png_structp png_ptr)
+png_get_user_transform_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
diff --git a/pngwrite.c b/pngwrite.c
index 025205198..dce38459a 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,8 +1,8 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.4.6 [March 8, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -661,8 +661,8 @@ png_write_row(png_structp png_ptr, png_bytep row)
if (png_ptr == NULL)
return;
- png_debug2(1, "in png_write_row (row %ld, pass %d)",
- png_ptr->row_number, png_ptr->pass);
+ png_debug2(1, "in png_write_row (row %lu, pass %d)",
+ (unsigned long)png_ptr->row_number, png_ptr->pass);
/* Initialize transformations and other stuff if first time */
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
@@ -778,7 +778,8 @@ png_write_row(png_structp png_ptr, png_bytep row)
png_ptr->row_info.width);
png_debug1(3, "row_info->color_type = %d", png_ptr->row_info.color_type);
- png_debug1(3, "row_info->width = %lu", png_ptr->row_info.width);
+ png_debug1(3, "row_info->width = %lu",
+ (unsigned long)png_ptr->row_info.width);
png_debug1(3, "row_info->channels = %d", png_ptr->row_info.channels);
png_debug1(3, "row_info->bit_depth = %d", png_ptr->row_info.bit_depth);
png_debug1(3, "row_info->pixel_depth = %d", png_ptr->row_info.pixel_depth);
@@ -1450,8 +1451,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
- transforms = transforms; /* Quiet compiler warnings */
- params = params;
+ PNG_UNUSED(transforms) /* Quiet compiler warnings */
+ PNG_UNUSED(params)
}
#endif
#endif /* PNG_WRITE_SUPPORTED */
diff --git a/pngwutil.c b/pngwutil.c
index 8f7c7c24d..b73c6a9d9 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -682,9 +682,24 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
if (length >= 2 &&
png_ptr->height < 16384 && png_ptr->width < 16384)
{
+ /* Compute the maximum possible length of the datastream */
+
+ /* Number of pixels, plus for each row a filter byte and possible
+ * and possibly a padding byte, so increase the maximum
+ * size to account for these.
+ */
png_uint_32 uncompressed_idat_size = png_ptr->height *
((png_ptr->width *
png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
+
+ /* If it's interlaced, each block of 8 rows is sent as up to
+ * 14 rows, i.e., 6 additional rows, each with a filter byte
+ * and possibly a padding byte
+ */
+ if (png_ptr->interlaced)
+ uncompressed_idat_size += ((png_ptr->height + 7)/8) *
+ (png_ptr->bit_depth < 8 ? 12 : 6);
+
unsigned int z_cinfo = z_cmf >> 4;
unsigned int half_z_window_size = 1 << (z_cinfo + 7);
while (uncompressed_idat_size <= half_z_window_size &&
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 5ef1578be..9089f24e1 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
VisualStudio instructions
-libpng version 1.4.5 - December 9, 2010
+libpng version 1.4.6 - April 8, 2011
Copyright (c) 1998-2010 Glenn Randers-Pehrson
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index e69ec8f50..673bd55fe 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,9 +2,9 @@
<!--
* zlib.props - location of zlib source and build
*
- * libpng version 1.4.5 - December 9, 2010
+ * libpng version 1.4.6 - April 8, 2011
*
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -29,7 +29,7 @@
zlib.h # The header file
zconf.h # Another header file included by zlib.h
-->
- <ZLib1Dir>..\..\..\..\zlib124-dll\zlib-1.2.4</ZLib1Dir>
+ <ZLib1Dir>..\..\..\..\zlib125-dll\zlib-1.2.5</ZLib1Dir>
<!-- Place the name of the directory containing the source of
zlib used for debugging in this property.
@@ -38,6 +38,6 @@
'.h' files in the source match those from the 'official'
build above.
-->
- <ZLibSrcDir>..\..\..\..\zlib-1.2.4</ZLibSrcDir>
+ <ZLibSrcDir>..\..\..\..\zlib-1.2.5</ZLibSrcDir>
</PropertyGroup>
</Project>
diff --git a/scripts/README.txt b/scripts/README.txt
index a9735c785..d5b005c0f 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,8 +1,8 @@
-Makefiles for libpng version 1.4.5 - December 9, 2010
+Makefiles for libpng version 1.4.6 - April 8, 2011
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -20,7 +20,7 @@ Makefiles for libpng version 1.4.5 - December 9, 2010
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
makefile.elf => Linux/ELF makefile symbol versioning,
- (gcc, creates libpng14.so.14.1.4.5)
+ (gcc, creates libpng14.so.14.1.4.6)
makefile.freebsd => FreeBSD makefile
makefile.gcc => Generic gcc makefile
makefile.hpgcc => HPUX makefile using gcc
@@ -36,12 +36,12 @@ Makefiles for libpng version 1.4.5 - December 9, 2010
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng14.so.14.1.4.5)
+ creates libpng14.so.14.1.4.6)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng14.so.14.1.4.5)
+ creates libpng14.so.14.1.4.6)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng14.so.14.1.4.5)
+ creates libpng14.so.14.1.4.6)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index c92c9e2f4..5e011a6bd 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.4.5
+version=1.4.6
prefix=""
libdir=""
libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index 131d6e37a..4c11fda00 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng14
Name: libpng
Description: Loads and saves PNG files
-Version: 1.4.5
+Version: 1.4.6
Libs: -L${libdir} -lpng14
Cflags: -I${includedir}
diff --git a/scripts/makefile.cegcc b/scripts/makefile.cegcc
index e1785a08a..c56b4b45c 100644
--- a/scripts/makefile.cegcc
+++ b/scripts/makefile.cegcc
@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 4
-VERMIC = 5
+VERMIC = 6
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index 203e9c41e..1dfddf29a 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng14
PNGMAJ = 14
-RELEASE = 5
+RELEASE = 6
# Shared library names:
LIBSO=$(LIBNAME).so
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index aeea61c59..105b07f96 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng14
LIB= png14
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.4.5
+SHLIB_MINOR= 1.4.6
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 8500e9a52..520186703 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.4.5
+SHLIB_MINOR= 1.4.6
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index 21b6840bb..1f046a3dd 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.4.5
+SHLIB_MINOR= 1.4.6
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.vcwin32 b/scripts/makefile.vcwin32
index a65f1c112..a23c0750f 100644
--- a/scripts/makefile.vcwin32
+++ b/scripts/makefile.vcwin32
@@ -15,7 +15,7 @@
CC = cl
LD = link
AR = lib
-CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
+CFLAGS = -nologo -D_CRT_SECURE_NO_DEPRECATE -MD -O2 -W3 -I..\zlib
LDFLAGS = -nologo
ARFLAGS = -nologo
RM = del
diff --git a/scripts/png32ce.def b/scripts/png32ce.def
index a934b27a0..e837ea1fc 100644
--- a/scripts/png32ce.def
+++ b/scripts/png32ce.def
@@ -15,7 +15,7 @@ LIBRARY lpngce
png_get_int_32
EXPORTS
-;Version 1.4.5
+;Version 1.4.6
png_build_grayscale_palette @1
; png_check_sig @2
png_chunk_error @3
@@ -198,9 +198,11 @@ EXPORTS
; png_read_init_3 @175
; png_write_init_3 @176
png_info_init_3 @177
- png_destroy_struct @178
+; Moved to pngpriv.h
+; png_destroy_struct @178
; Added at version 1.2.0
; For use with PNG_USER_MEM_SUPPORTED
+; Moved to pngpriv.h
; png_destroy_struct_2 @179
; png_create_read_struct_2 @180
; png_create_write_struct_2 @181
@@ -245,13 +247,14 @@ EXPORTS
; Added at version 1.2.41
png_write_sig @208
png_benign_error @209
- png_benign_chunk_error @210
+ png_chunk_benign_error @210
png_set_benign_error @211
png_get_io_chunk_name @212
png_get_io_state @213
png_get_chunk_cache_max @215
png_set_chunk_cache_max @216
- png_check_cHRM_fixed @217
+; Moved to pngpriv.h
+; png_check_cHRM_fixed @217
png_calloc @218
png_set_longjmp_fn @219
; Added at version 1.4.1
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index 0b4f4ea57..4472dc64f 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
-; Version 1.4.5
+; Version 1.4.6
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"
@@ -205,13 +205,14 @@ EXPORTS
; Added at version 1.2.41
png_write_sig
; png_benign_error
-; png_benign_chunk_error
+; png_chunk_benign_error
; png_set_benign_error
png_get_io_chunk_name
png_get_io_state
png_get_chunk_cache_max
png_set_chunk_cache_max
- png_check_cHRM_fixed
+; Moved to pngpriv.h
+; png_check_cHRM_fixed @217
png_calloc
png_set_longjmp_fn
; Added at version 1.4.1
diff --git a/scripts/pngwin.def b/scripts/pngwin.def
index d39f37e94..522b7505c 100644
--- a/scripts/pngwin.def
+++ b/scripts/pngwin.def
@@ -5,7 +5,7 @@
LIBRARY
EXPORTS
-;Version 1.4.5
+;Version 1.4.6
png_build_grayscale_palette
png_chunk_error
png_chunk_warning
@@ -169,10 +169,12 @@ EXPORTS
png_set_invalid
; Added at version 1.0.12
png_info_init_3
- png_destroy_struct
+; Moved to pngpriv.h
+; png_destroy_struct
; Added at version 1.2.0
; For use with PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2
+; Moved to pngpriv.h
+; png_destroy_struct_2
png_create_read_struct_2
png_create_write_struct_2
png_malloc_default
@@ -200,13 +202,14 @@ EXPORTS
; Added at version 1.2.41
png_write_sig
; png_benign_error
-; png_benign_chunk_error
+; png_chunk_benign_error
; png_set_benign_error
png_get_io_chunk_name
png_get_io_state
png_get_chunk_cache_max
png_set_chunk_cache_max
- png_check_cHRM_fixed
+; Moved to pngpriv.h
+; png_check_cHRM_fixed @217
png_calloc
png_set_longjmp_fn
; Added at version 1.4.1