[master] Imported from libpng-1.5.11.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index dbc2ed1..83347a0 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.5.10 - March 29, 2012
+Libpng 1.5.11 - June 14, 2012
This is a public release of libpng, intended for use in production codes.
@@ -8,52 +8,43 @@
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.5.10.tar.xz (LZMA-compressed, recommended)
- libpng-1.5.10.tar.gz
- libpng-1.5.10.tar.bz2
+ libpng-1.5.11.tar.xz (LZMA-compressed, recommended)
+ libpng-1.5.11.tar.gz
+ libpng-1.5.11.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng1510.7z (LZMA-compressed, recommended)
- lpng1510.zip
+ lpng1511.7z (LZMA-compressed, recommended)
+ lpng1511.zip
Other information:
- libpng-1.5.10-README.txt
- libpng-1.5.10-LICENSE.txt
+ libpng-1.5.11-README.txt
+ libpng-1.5.11-LICENSE.txt
-Changes since the last public release (1.5.9):
-
- Removed two useless #ifdef directives from pngread.c and one from pngrutil.c
- Always put the CMAKE_LIBRARY in "lib" (removed special WIN32 case).
- Removed empty vstudio/pngstest directory (Clifford Yapp).
- Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from
- pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c;
- now that png_ptr->buffer is inaccessible to applications, the special
- handling is no longer useful.
- Fixed bug with png_handle_hIST with odd chunk length (Frank Busse).
- Added PNG_SAFE_LIMITS feature to pnglibconf.dfa and code in pngconf.h
- to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined.
- To enable, use "CPPFLAGS=-DPNG_SAFE_LIMITS_SUPPORTED" on the configure
- command or put "#define PNG_SAFE_LIMITS_SUPPORTED" in pnglibconf.h.
- Revised the SAFE_LIMITS feature to be the same as the feature in libpng16.
- Added information about the new limits in the manual.
- Updated Makefile.in
- Removed unused "current_text" members of png_struct and the png_free()
- of png_ptr->current_text from pngread.c
- Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
- Fixed CMF optimization of non-IDAT compressed chunks, which was added at
- libpng-1.5.4. It sometimes produced too small of a window.
- Reject all iCCP chunks after the first, even if the first one is invalid.
- Added palette-index checking. Issue a png_benign_error() if an invalid
- index is found.
- Revised example.c to put text strings in a temporary character array
- instead of directly assigning string constants to png_textp members.
- This avoids compiler warnings when -Wwrite-strings is enabled.
- Prevent PNG_EXPAND+PNG_SHIFT doing the shift twice.
- Revised png_set_text_2() to avoid potential memory corruption (fixes
- CVE-2011-3048).
+Changes since the last public release (1.5.10):
+ Revised scripts/makefile.darwin: use system zlib; remove quotes around
+ architecture list; add missing ppc architecture; add architecture options
+ to shared library link; don't try to create a shared lib based on missing
+ RELEASE variable.
+ Enable png_set_check_for_invalid_index() for both read and write.
+ Removed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED/#endif in pngpriv.h around
+ declaration of png_handle_unknown().
+ Added -lssp_nonshared in a comment in scripts/makefile.freebsd
+ and changed deprecated NOOBJ and NOPROFILE to NO_OBJ and NO_PROFILE.
+ Revised CMakeLists.txt to not attempt to make a symlink under mingw.
+ Added two images to contrib/pngsuite (1-bit and 2-bit transparent grayscale),
+ and renamed three whose names were inconsistent with those in
+ pngsuite/README.txt.
+ Do not depend upon a GCC feature macro being available for use in generating
+ the linker mapfile symbol prefix.
+ Made fixes for new optimization warnings from gcc 4.7.0. The compiler
+ performed an optimization which is safe but then warned about it.
+ Changing the type of 'palette_number' in pngvalid.c removes the warning.
+ Improved efficiency of new do_check_palette_indexes() function.
+ Don't check palette indexes if num_palette is 0 (as it can be in MNG files).
+ Include zlib.h in contrib/gregbook and contrib/visupng examples.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 70af827..16f2ebc 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3854,6 +3854,43 @@
Revised png_set_text_2() to avoid potential memory corruption (fixes
CVE-2011-3048).
+Version 1.5.11beta01 [April 28, 2012]
+ Revised scripts/makefile.darwin: use system zlib; remove quotes around
+ architecture list; add missing ppc architecture; add architecture options
+ to shared library link; don't try to create a shared lib based on missing
+ RELEASE variable.
+ Enable png_set_check_for_invalid_index() for both read and write.
+ Removed #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED/#endif in pngpriv.h around
+ declaration of png_handle_unknown().
+ Added -lssp_nonshared in a comment in scripts/makefile.freebsd
+ and changed deprecated NOOBJ and NOPROFILE to NO_OBJ and NO_PROFILE.
+
+Version 1.5.11rc01 [May 23, 2012]
+ No changes.
+
+Version 1.5.11rc02 [May 29, 2012]
+ Fixed some typos in comments.
+ Revised CMakeLists.txt to not attempt to make a symlink under mingw.
+ Added two images to contrib/pngsuite (1-bit and 2-bit transparent grayscale),
+ and renamed three whose names were inconsistent with those in
+ pngsuite/README.txt.
+
+Version 1.5.11rc03 [June 4, 2012]
+ Do not depend upon a GCC feature macro being available for use in generating
+ the linker mapfile symbol prefix.
+ Made fixes for new optimization warnings from gcc 4.7.0. The compiler
+ performed an optimization which is safe but then warned about it.
+ Changing the type of 'palette_number' in pngvalid.c removes the warning.
+
+Version 1.5.11rc04 [June 6, 2012]
+ Improved performance of new do_check_palette_indexes() function.
+
+Version 1.5.11rc05 [June 7, 2012]
+ Don't check palette indexes if num_palette is 0 (as it can be in MNG files).
+
+Version 1.5.11 [June 14, 2012]
+ Include zlib.h in contrib/gregbook and contrib/visupng examples.
+
Send comments/corrections/commendations 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 b511789..27c3ea6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 5)
-set(PNGLIB_RELEASE 10)
+set(PNGLIB_RELEASE 11)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -184,7 +184,7 @@
# copies if different.
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
- if(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ if(WIN32 AND NOT CYGWIN AND NOT MSYS)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
@@ -192,10 +192,10 @@
DEPENDS ${PNG_LIB_NAME} ${PNG_LIB_NAME_STATIC}
)
ADD_CUSTOM_TARGET(${DEST_FILE}_COPY ALL DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
- else(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ else(WIN32 AND NOT CYGWIN AND NOT MSYS)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SRC_FILE} ${DEST_FILE} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
- endif(WIN32 AND NOT CYGWIN AND NOT MINGW)
+ endif(WIN32 AND NOT CYGWIN AND NOT MSYS)
endmacro()
# libpng is a library so default to 'lib'
@@ -225,7 +225,7 @@
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 15.${PNGLIB_RELEASE}.1.5.10
+# VERSION 15.${PNGLIB_RELEASE}.1.5.11
VERSION 15.${PNGLIB_RELEASE}.0
SOVERSION 15
CLEAN_DIRECT_OUTPUT 1)
diff --git a/LICENSE b/LICENSE
index b72d125..e8e66ae 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,8 +10,8 @@
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.5.10, March 29, 2012, are
-Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
+libpng versions 1.2.6, August 15, 2004, through 1.5.11, June 14, 2012, are
+Copyright (c) 2004, 2006-2012 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 @@
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-March 29, 2012
+June 14, 2012
diff --git a/README b/README
index e821ee4..c8b437f 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.5.10 - March 29, 2012 (shared library 15.0)
+README for libpng version 1.5.11 - June 14, 2012 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
diff --git a/configure b/configure
index df2d173..deddd3e 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.68 for libpng 1.5.10.
+# Generated by GNU Autoconf 2.68 for libpng 1.5.11.
#
# Report bugs to <png-mng-implement@lists.sourceforge.net>.
#
@@ -570,8 +570,8 @@
# Identity of this package.
PACKAGE_NAME='libpng'
PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.5.10'
-PACKAGE_STRING='libpng 1.5.10'
+PACKAGE_VERSION='1.5.11'
+PACKAGE_STRING='libpng 1.5.11'
PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
PACKAGE_URL=''
@@ -1321,7 +1321,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libpng 1.5.10 to adapt to many kinds of systems.
+\`configure' configures libpng 1.5.11 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1391,7 +1391,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libpng 1.5.10:";;
+ short | recursive ) echo "Configuration of libpng 1.5.11:";;
esac
cat <<\_ACEOF
@@ -1502,7 +1502,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libpng configure 1.5.10
+libpng configure 1.5.11
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1925,7 +1925,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libpng $as_me 1.5.10, which was
+It was created by libpng $as_me 1.5.11, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2740,7 +2740,7 @@
# Define the identity of the package.
PACKAGE='libpng'
- VERSION='1.5.10'
+ VERSION='1.5.11'
cat >>confdefs.h <<_ACEOF
@@ -2804,10 +2804,10 @@
-PNGLIB_VERSION=1.5.10
+PNGLIB_VERSION=1.5.11
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
-PNGLIB_RELEASE=10
+PNGLIB_RELEASE=11
@@ -12784,9 +12784,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
$as_echo_n "checking for symbol prefix... " >&6; }
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} "s:^PREFIX=::"`
+ | ${CPP-${CC-gcc} -E} - 2>&1 \
+ | ${EGREP-grep} "^PREFIX=" \
+ | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
$as_echo "$SYMBOL_PREFIX" >&6; }
@@ -13417,7 +13417,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libpng $as_me 1.5.10, which was
+This file was extended by libpng $as_me 1.5.11, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -13483,7 +13483,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libpng config.status 1.5.10
+libpng config.status 1.5.11
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 023aba4..4dc2a82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,15 +18,15 @@
dnl Version number stuff here:
-AC_INIT([libpng], [1.5.10], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.5.11], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
-PNGLIB_VERSION=1.5.10
+PNGLIB_VERSION=1.5.11
PNGLIB_MAJOR=1
PNGLIB_MINOR=5
-PNGLIB_RELEASE=10
+PNGLIB_RELEASE=11
dnl End of version number stuff
@@ -145,9 +145,9 @@
if test "$have_ld_version_script" = "yes"; then
AC_MSG_CHECKING([for symbol prefix])
SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} "s:^PREFIX=::"`
+ | ${CPP-${CC-gcc} -E} - 2>&1 \
+ | ${EGREP-grep} "^PREFIX=" \
+ | ${SED-sed} -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"`
AC_SUBST(SYMBOL_PREFIX)
AC_MSG_RESULT($SYMBOL_PREFIX)
fi
diff --git a/contrib/gregbook/readpng.c b/contrib/gregbook/readpng.c
index df42c30..0b75fac 100644
--- a/contrib/gregbook/readpng.c
+++ b/contrib/gregbook/readpng.c
@@ -55,8 +55,9 @@
#include <stdio.h>
#include <stdlib.h>
+#include <zlib.h>
-#include "png.h" /* libpng header; includes zlib.h */
+#include "png.h" /* libpng header */
#include "readpng.h" /* typedefs, common macros, public prototypes */
/* future versions of libpng will provide this macro: */
diff --git a/contrib/gregbook/writepng.c b/contrib/gregbook/writepng.c
index f07f4a8..0dda62e 100644
--- a/contrib/gregbook/writepng.c
+++ b/contrib/gregbook/writepng.c
@@ -55,8 +55,9 @@
#include <stdlib.h> /* for exit() prototype */
+#include <zlib.h>
-#include "png.h" /* libpng header; includes zlib.h and setjmp.h */
+#include "png.h" /* libpng header, includes setjmp.h */
#include "writepng.h" /* typedefs, common macros, public prototypes */
diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
index 3dd6f21..e10381d 100644
--- a/contrib/libtests/pngvalid.c
+++ b/contrib/libtests/pngvalid.c
@@ -1,7 +1,7 @@
/* pngvalid.c - validate libpng by constructing then reading png files.
*
- * Last changed in libpng 1.5.8 [%RDATE%]
+ * Last changed in libpng 1.5.8 [February 1, 2012]
* Copyright (c) 2012 Glenn Randers-Pehrson
* Written by John Cunningham Bowler
*
@@ -244,7 +244,7 @@
#define COL_FROM_ID(id) ((png_byte)((id)& 0x7U))
#define DEPTH_FROM_ID(id) ((png_byte)(((id) >> 3) & 0x1fU))
-#define PALETTE_FROM_ID(id) ((int)(((id) >> 8) & 0x1f))
+#define PALETTE_FROM_ID(id) (((id) >> 8) & 0x1f)
#define INTERLACE_FROM_ID(id) ((int)(((id) >> 13) & 0x3))
#define DO_INTERLACE_FROM_ID(id) ((int)(((id)>>15) & 1))
#define WIDTH_FROM_ID(id) (((id)>>16) & 0xff)
@@ -253,7 +253,7 @@
/* Utility to construct a standard name for a standard image. */
static size_t
standard_name(char *buffer, size_t bufsize, size_t pos, png_byte colour_type,
- int bit_depth, int npalette, int interlace_type,
+ int bit_depth, unsigned int npalette, int interlace_type,
png_uint_32 w, png_uint_32 h, int do_interlace)
{
pos = safecat(buffer, bufsize, pos, colour_types[colour_type]);
@@ -315,10 +315,11 @@
/* The following defines the number of different palettes to generate for
* each log bit depth of a colour type 3 standard image.
*/
-#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1 : 16)
+#define PALETTE_COUNT(bit_depth) ((bit_depth) > 4 ? 1U : 16U)
static int
-next_format(png_bytep colour_type, png_bytep bit_depth, int* palette_number)
+next_format(png_bytep colour_type, png_bytep bit_depth,
+ unsigned int* palette_number)
{
if (*bit_depth == 0)
{
@@ -3256,8 +3257,8 @@
*/
static void
make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type,
- png_byte PNG_CONST bit_depth, int palette_number, int interlace_type,
- png_const_charp name)
+ png_byte PNG_CONST bit_depth, unsigned int palette_number,
+ int interlace_type, png_const_charp name)
{
context(ps, fault);
@@ -3384,7 +3385,7 @@
{
png_byte colour_type = 0;
png_byte bit_depth = 0;
- int palette_number = 0;
+ unsigned int palette_number = 0;
/* This is in case of errors. */
safecat(ps->test, sizeof ps->test, 0, "make standard images");
@@ -7069,7 +7070,7 @@
{
png_byte colour_type = 0;
png_byte bit_depth = 0;
- int palette_number = 0;
+ unsigned int palette_number = 0;
while (next_format(&colour_type, &bit_depth, &palette_number))
{
@@ -8428,7 +8429,7 @@
{
png_byte colour_type = 0;
png_byte bit_depth = 0;
- int palette_number = 0;
+ unsigned int palette_number = 0;
/* Don't test more than one instance of each palette - it's pointless, in
* fact this test is somewhat excessive since libpng doesn't make this
@@ -8493,7 +8494,7 @@
{
png_byte colour_type = 0;
png_byte bit_depth = 0;
- int palette_number = 0;
+ unsigned int palette_number = 0;
while (next_format(&colour_type, &bit_depth, &palette_number))
{
@@ -8522,11 +8523,8 @@
*/
for (sbit=pm->sbitlow; sbit<(1<<READ_BDHI); ++sbit)
{
- png_byte colour_type, bit_depth;
- int npalette;
-
- colour_type = bit_depth = 0;
- npalette = 0;
+ png_byte colour_type = 0, bit_depth = 0;
+ unsigned int npalette = 0;
while (next_format(&colour_type, &bit_depth, &npalette))
if ((colour_type & PNG_COLOR_MASK_ALPHA) == 0 &&
@@ -8742,7 +8740,7 @@
{
png_byte colour_type = 0;
png_byte bit_depth = 0;
- int palette_number = 0;
+ unsigned int palette_number = 0;
/* Skip the non-alpha cases - there is no setting of a transparency colour at
* present.
diff --git a/contrib/pngsuite/README b/contrib/pngsuite/README
index b2b1537..ec4af94 100644
--- a/contrib/pngsuite/README
+++ b/contrib/pngsuite/README
@@ -1,7 +1,8 @@
pngsuite
--------
-(c) Willem van Schaik, 1999, 2011
+(c) Willem van Schaik, 1999, 2011, 2012
+Two images are by Glenn Randers-Pehrson, 2012
Permission to use, copy, modify, and distribute these images for any
purpose and without fee is hereby granted.
@@ -38,6 +39,8 @@
basn6a08.png 8-bit RGBA
basn6a16.png 16-bit RGBA
+ ftbbn0g01.png 1-bit grayscale, black bKGD
+ ftbbn0g02.png 2-bit grayscale, black bKGD
ftbbn0g04.png 4-bit grayscale, black bKGD
ftbbn2c16.png 16-bit truecolor, black bKGD
ftbbn3p08.png 8-bit paletted, black bKGD
diff --git a/contrib/pngsuite/ftbbn0g01.png b/contrib/pngsuite/ftbbn0g01.png
new file mode 100644
index 0000000..ba746ff
--- /dev/null
+++ b/contrib/pngsuite/ftbbn0g01.png
Binary files differ
diff --git a/contrib/pngsuite/ftbbn0g02.png b/contrib/pngsuite/ftbbn0g02.png
new file mode 100644
index 0000000..3d83bd6
--- /dev/null
+++ b/contrib/pngsuite/ftbbn0g02.png
Binary files differ
diff --git a/contrib/pngsuite/ftbbn1g04.png b/contrib/pngsuite/ftbbn0g04.png
similarity index 100%
rename from contrib/pngsuite/ftbbn1g04.png
rename to contrib/pngsuite/ftbbn0g04.png
Binary files differ
diff --git a/contrib/pngsuite/ftbwn1g16.png b/contrib/pngsuite/ftbwn0g16.png
similarity index 100%
rename from contrib/pngsuite/ftbwn1g16.png
rename to contrib/pngsuite/ftbwn0g16.png
Binary files differ
diff --git a/contrib/pngsuite/ftp0n1g08.png b/contrib/pngsuite/ftp0n0g08.png
similarity index 100%
rename from contrib/pngsuite/ftp0n1g08.png
rename to contrib/pngsuite/ftp0n0g08.png
Binary files differ
diff --git a/contrib/visupng/PngFile.c b/contrib/visupng/PngFile.c
index ef0984e..dcde18a 100644
--- a/contrib/visupng/PngFile.c
+++ b/contrib/visupng/PngFile.c
@@ -13,6 +13,7 @@
#include <commdlg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <zlib.h>
#include "png.h"
#include "pngfile.h"
diff --git a/contrib/visupng/VisualPng.c b/contrib/visupng/VisualPng.c
index 009f120..236525a 100644
--- a/contrib/visupng/VisualPng.c
+++ b/contrib/visupng/VisualPng.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <windows.h>
+#include <zlib.h>
/* application includes */
diff --git a/libpng-manual.txt b/libpng-manual.txt
index d55e80a..16b4d23 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -1,6 +1,6 @@
-libpng-manual.txt - A description on how to use and modify libpng
+Libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.5.10 - March 29, 2012
+ libpng version 1.5.11 - June 14, 2012
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.5.10 - March 29, 2012
+ libpng versions 0.97, January 1998, through 1.5.11 - June 14, 2012
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -141,8 +141,8 @@
to integers of particular sizes and types for passing color values.
One exception is how non-integral numbers are handled. For application
-convenience most APIs that take such numbers have C (double) arguments,
-however internally PNG, and libpng, use 32 bit signed integers and encode
+convenience most APIs that take such numbers have C (double) arguments;
+however, internally PNG, and libpng, use 32 bit signed integers and encode
the value by multiplying by 100,000. As of libpng 1.5.0 a convenience
macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point)
which is simply (png_int_32).
@@ -799,7 +799,7 @@
will still have linear components.
Use this format if you have control over your
-compositing software and do don't do other arithmetic
+compositing software and so don't do other arithmetic
(such as scaling) on the data you get from libpng. Your
compositing software can simply copy opaque pixels to
the output but still has linear values for the
@@ -1130,6 +1130,11 @@
png_get_<chunk> are set directly if they are simple data types, or a
pointer into the info_ptr is returned for any complex types.
+The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks
+is simply returned to give the application information about how the
+image was encoded. Libpng itself only does transformations using the file
+gamma when combining semitransparent pixels with the background color.
+
png_get_PLTE(png_ptr, info_ptr, &palette,
&num_palette);
@@ -1141,7 +1146,7 @@
png_get_gAMA(png_ptr, info_ptr, &file_gamma);
png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma);
- file_gamma - the gamma at which the file is
+ file_gamma - the gamma at which the file was
written (PNG_INFO_gAMA)
int_file_gamma - 100,000 times the gamma at which the
@@ -1733,7 +1738,7 @@
need to tell libpng how the color is represented, both the format of the
component values in the color (the number of bits) and the gamma encoding of the
color. The function takes two arguments, background_gamma_mode and need_expand
-to convey this information, however only two combinations are likely to be
+to convey this information; however, only two combinations are likely to be
useful:
png_color_16 my_background;
@@ -2027,7 +2032,7 @@
If you don't want libpng to handle the interlacing details, just call
png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images.
-Each of the images is a valid image by itself, however you will almost
+Each of the images is a valid image by itself; however, you will almost
certainly need to distribute the pixels from each sub-image to the
correct place. This is where everything gets very tricky.
@@ -3685,7 +3690,7 @@
compressed chunks such as zTXt, iTXt, and iCCP:
#include zlib.h
- #if PNG_LIBPNG_VER <= 10504
+ #if PNG_LIBPNG_VER >= 10504
png_set_text_compression_level(png_ptr, level);
png_set_text_compression_mem_level(png_ptr, level);
@@ -4155,7 +4160,7 @@
A. Changes that affect users of libpng
There are no substantial API changes between the non-deprecated parts of
-the 1.4.5 API and the 1.5.0 API, however the ability to directly access
+the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
the main libpng control structures, png_struct and png_info, deprecated
in earlier versions of libpng, has been completely removed from
libpng 1.5.
@@ -4288,12 +4293,12 @@
Details of internal changes to the library code can be found in the CHANGES
file and in the GIT repository logs. These will be of no concern to the vast
-majority of library users or builders, however the few who configure libpng
+majority of library users or builders; however, the few who configure libpng
to a non-default feature set may need to change how this is done.
There should be no need for library builders to alter build scripts if
these use the distributed build support - configure or the makefiles -
-however users of the makefiles may care to update their build scripts
+however, users of the makefiles may care to update their build scripts
to build pnglibconf.h where the corresponding makefile does not do so.
Building libpng with a non-default configuration has changed completely.
@@ -4399,7 +4404,7 @@
PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating
point implementation or the fixed point one. Typically the fixed point
implementation is larger and slower than the floating point implementation
-on a system that supports floating point, however it may be faster on a
+on a system that supports floating point; however, it may be faster on a
system which lacks floating point hardware and therefore uses a software
emulation.
@@ -4428,7 +4433,7 @@
build of pnglibconf.h and it is never included in an application build.
The rarely used alternative of adding a list of feature macros to the
-CFLAGS setting in the build also still works, however the macros will be
+CFLAGS setting in the build also still works; however, the macros will be
copied to pnglibconf.h and this may produce macro redefinition warnings
when the individual C files are compiled.
@@ -4597,25 +4602,25 @@
XIV. Y2K Compliance in libpng
-March 29, 2012
+June 14, 2012
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.5.10 are Y2K compliant. It is my belief that earlier
+upward through 1.5.11 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
-will hold years up to 65535. The other two hold the date in text
+Libpng only has two year fields. One is a 2-byte unsigned integer that
+will hold years up to 65535. The other holds the date in text
format, and will hold years up to 9999.
The integer is
"png_uint_16 year" in png_time_struct.
-The strings are
- "png_charp time_buffer" in png_struct and
- "near_time_buffer", which is a local character string in png.c.
+The string is
+ "char time_buffer[29]" in png_struct. This will no
+longer be used in libpng-1.6.x and will be removed from libpng-1.7.0.
There are seven time-related functions:
diff --git a/libpng.3 b/libpng.3
index bba25af..c91f987 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "March 29, 2012"
+.TH LIBPNG 3 "June 14, 2012"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.10
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.11
.SH SYNOPSIS
\fI\fB
@@ -979,9 +979,9 @@
compression library.
Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
-libpng-manual.txt - A description on how to use and modify libpng
+Libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.5.10 - March 29, 2012
+ libpng version 1.5.11 - June 14, 2012
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -992,7 +992,7 @@
Based on:
- libpng versions 0.97, January 1998, through 1.5.10 - March 29, 2012
+ libpng versions 0.97, January 1998, through 1.5.11 - June 14, 2012
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -1122,8 +1122,8 @@
to integers of particular sizes and types for passing color values.
One exception is how non-integral numbers are handled. For application
-convenience most APIs that take such numbers have C (double) arguments,
-however internally PNG, and libpng, use 32 bit signed integers and encode
+convenience most APIs that take such numbers have C (double) arguments;
+however, internally PNG, and libpng, use 32 bit signed integers and encode
the value by multiplying by 100,000. As of libpng 1.5.0 a convenience
macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point)
which is simply (png_int_32).
@@ -1780,7 +1780,7 @@
will still have linear components.
Use this format if you have control over your
-compositing software and do don't do other arithmetic
+compositing software and so don't do other arithmetic
(such as scaling) on the data you get from libpng. Your
compositing software can simply copy opaque pixels to
the output but still has linear values for the
@@ -2111,6 +2111,11 @@
png_get_<chunk> are set directly if they are simple data types, or a
pointer into the info_ptr is returned for any complex types.
+The colorspace data from gAMA, cHRM, sRGB, iCCP, and sBIT chunks
+is simply returned to give the application information about how the
+image was encoded. Libpng itself only does transformations using the file
+gamma when combining semitransparent pixels with the background color.
+
png_get_PLTE(png_ptr, info_ptr, &palette,
&num_palette);
@@ -2122,7 +2127,7 @@
png_get_gAMA(png_ptr, info_ptr, &file_gamma);
png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma);
- file_gamma - the gamma at which the file is
+ file_gamma - the gamma at which the file was
written (PNG_INFO_gAMA)
int_file_gamma - 100,000 times the gamma at which the
@@ -2714,7 +2719,7 @@
need to tell libpng how the color is represented, both the format of the
component values in the color (the number of bits) and the gamma encoding of the
color. The function takes two arguments, background_gamma_mode and need_expand
-to convey this information, however only two combinations are likely to be
+to convey this information; however, only two combinations are likely to be
useful:
png_color_16 my_background;
@@ -3008,7 +3013,7 @@
If you don't want libpng to handle the interlacing details, just call
png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images.
-Each of the images is a valid image by itself, however you will almost
+Each of the images is a valid image by itself; however, you will almost
certainly need to distribute the pixels from each sub-image to the
correct place. This is where everything gets very tricky.
@@ -4667,7 +4672,7 @@
compressed chunks such as zTXt, iTXt, and iCCP:
#include zlib.h
- #if PNG_LIBPNG_VER <= 10504
+ #if PNG_LIBPNG_VER >= 10504
png_set_text_compression_level(png_ptr, level);
png_set_text_compression_mem_level(png_ptr, level);
@@ -5137,7 +5142,7 @@
A. Changes that affect users of libpng
There are no substantial API changes between the non-deprecated parts of
-the 1.4.5 API and the 1.5.0 API, however the ability to directly access
+the 1.4.5 API and the 1.5.0 API; however, the ability to directly access
the main libpng control structures, png_struct and png_info, deprecated
in earlier versions of libpng, has been completely removed from
libpng 1.5.
@@ -5270,12 +5275,12 @@
Details of internal changes to the library code can be found in the CHANGES
file and in the GIT repository logs. These will be of no concern to the vast
-majority of library users or builders, however the few who configure libpng
+majority of library users or builders; however, the few who configure libpng
to a non-default feature set may need to change how this is done.
There should be no need for library builders to alter build scripts if
these use the distributed build support - configure or the makefiles -
-however users of the makefiles may care to update their build scripts
+however, users of the makefiles may care to update their build scripts
to build pnglibconf.h where the corresponding makefile does not do so.
Building libpng with a non-default configuration has changed completely.
@@ -5381,7 +5386,7 @@
PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating
point implementation or the fixed point one. Typically the fixed point
implementation is larger and slower than the floating point implementation
-on a system that supports floating point, however it may be faster on a
+on a system that supports floating point; however, it may be faster on a
system which lacks floating point hardware and therefore uses a software
emulation.
@@ -5410,7 +5415,7 @@
build of pnglibconf.h and it is never included in an application build.
The rarely used alternative of adding a list of feature macros to the
-CFLAGS setting in the build also still works, however the macros will be
+CFLAGS setting in the build also still works; however, the macros will be
copied to pnglibconf.h and this may produce macro redefinition warnings
when the individual C files are compiled.
@@ -5579,25 +5584,25 @@
.SH XIV. Y2K Compliance in libpng
-March 29, 2012
+June 14, 2012
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.5.10 are Y2K compliant. It is my belief that earlier
+upward through 1.5.11 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
-will hold years up to 65535. The other two hold the date in text
+Libpng only has two year fields. One is a 2-byte unsigned integer that
+will hold years up to 65535. The other holds the date in text
format, and will hold years up to 9999.
The integer is
"png_uint_16 year" in png_time_struct.
-The strings are
- "png_charp time_buffer" in png_struct and
- "near_time_buffer", which is a local character string in png.c.
+The string is
+ "char time_buffer[29]" in png_struct. This will no
+longer be used in libpng-1.6.x and will be removed from libpng-1.7.0.
There are seven time-related functions:
@@ -5798,6 +5803,9 @@
1.5.9 15 10509 15.so.15.9[.0]
1.5.10beta01-05 15 10510 15.so.15.10[.0]
1.5.10 15 10510 15.so.15.10[.0]
+ 1.5.11beta01 15 10511 15.so.15.11[.0]
+ 1.5.11rc01-05 15 10511 15.so.15.11[.0]
+ 1.5.11 15 10511 15.so.15.11[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -5854,7 +5862,7 @@
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.5.10 - March 29, 2012:
+Libpng version 1.5.11 - June 14, 2012:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -5877,7 +5885,7 @@
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.5.10, March 29, 2012, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.11, June 14, 2012, 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
@@ -5976,7 +5984,7 @@
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-March 29, 2012
+June 14, 2012
.\" end of man page
diff --git a/libpngpf.3 b/libpngpf.3
index 8449f17..b435bfe 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "March 29, 2012"
+.TH LIBPNGPF 3 "June 14, 2012"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.10
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.11
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"
diff --git a/png.5 b/png.5
index 34f0e59..d0511b3 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "March 29, 2012"
+.TH PNG 5 "June 14, 2012"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
diff --git a/png.c b/png.c
index cba18ba..aecfd5c 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.5.10 [March 8, 2012]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_10 Your_png_h_is_not_version_1_5_10;
+typedef png_libpng_version_1_5_11 Your_png_h_is_not_version_1_5_11;
/* 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
@@ -655,14 +655,14 @@
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.5.10 - March 29, 2012" PNG_STRING_NEWLINE \
- "Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
+ "libpng version 1.5.11 - June 14, 2012" PNG_STRING_NEWLINE \
+ "Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.5.10 - March 29, 2012\
- Copyright (c) 1998-2011 Glenn Randers-Pehrson\
+ return "libpng version 1.5.11 - June 14, 2012\
+ Copyright (c) 1998-2012 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
# endif
@@ -969,8 +969,8 @@
* and it is certain that it becomes unstable where the end points are close
* together.
*
- * So this code uses the perhaps slighly less optimal but more understandable
- * and totally obvious approach of calculating color-scale.
+ * So this code uses the perhaps slightly less optimal but more
+ * understandable and totally obvious approach of calculating color-scale.
*
* This algorithm depends on the precision in white-scale and that is
* (1/white-y), so we can immediately see that as white-y approaches 0 the
@@ -2044,7 +2044,7 @@
}
#endif
-#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gammma */
+#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gamma */
/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */
png_fixed_point
png_reciprocal(png_fixed_point a)
diff --git a/png.h b/png.h
index 4e0dee1..b1c9e72 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.5.10 - March 29, 2012
+ * libpng version 1.5.11 - June 14, 2012
* Copyright (c) 1998-2012 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.5.10 - March 29, 2012: Glenn
+ * libpng versions 0.97, January 1998, through 1.5.11 - June 14, 2012: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -174,6 +174,9 @@
* 1.5.9 15 10509 15.so.15.9[.0]
* 1.5.10beta01-05 15 10510 15.so.15.10[.0]
* 1.5.10 15 10510 15.so.15.10[.0]
+ * 1.5.11beta01 15 10511 15.so.15.11[.0]
+ * 1.5.11rc01-05 15 10511 15.so.15.11[.0]
+ * 1.5.11 15 10511 15.so.15.11[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -205,7 +208,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.5.10, March 29, 2012, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.11, June 14, 2012, are
* Copyright (c) 2004, 2006-2012 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:
@@ -317,13 +320,13 @@
* Y2K compliance in libpng:
* =========================
*
- * March 29, 2012
+ * June 14, 2012
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.5.10 are Y2K compliant. It is my belief that
+ * upward through 1.5.11 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant.
*
* Libpng only has two year fields. One is a 2-byte unsigned integer
@@ -334,7 +337,8 @@
* "png_uint_16 year" in png_time_struct.
*
* The string is
- * "png_char time_buffer" in png_struct
+ * "char time_buffer[29]" in png_struct. This will be no
+ * longer used in libpng-1.6.0 and will be removed from libpng-1.7.0.
*
* There are seven time-related functions:
* png.c: png_convert_to_rfc_1123() in png.c
@@ -381,9 +385,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.5.10"
+#define PNG_LIBPNG_VER_STRING "1.5.11"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.5.10 - March 29, 2012\n"
+ " libpng version 1.5.11 - June 14, 2012\n"
#define PNG_LIBPNG_VER_SONUM 15
#define PNG_LIBPNG_VER_DLLNUM 15
@@ -391,7 +395,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 5
-#define PNG_LIBPNG_VER_RELEASE 10
+#define PNG_LIBPNG_VER_RELEASE 11
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -422,7 +426,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 10510 /* 1.5.10 */
+#define PNG_LIBPNG_VER 10511 /* 1.5.11 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -544,7 +548,7 @@
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef char* png_libpng_version_1_5_10;
+typedef char* png_libpng_version_1_5_11;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to
diff --git a/pngconf.h b/pngconf.h
index bbb547f..314fcc6 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.5.10 - March 29, 2012
+ * libpng version 1.5.11 - June 14, 2012
*
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -25,7 +25,7 @@
#ifndef PNG_BUILDING_SYMBOL_TABLE
/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
* definition file for machine specific limits, this may impact the
- * correctness of the definitons below (see uses of INT_MAX).
+ * correctness of the definitions below (see uses of INT_MAX).
*/
# ifndef PNG_NO_LIMITS_H
# include <limits.h>
diff --git a/pngerror.c b/pngerror.c
index 95002f8..e0585a8 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -2,7 +2,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.5.8 [February 1, 2011]
- * Copyright (c) 1998-2012 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/pngpread.c b/pngpread.c
index 8a5aa29..6b65ba8 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.5.9 [February 18, 2012]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -282,8 +282,8 @@
png_error(png_ptr, "Missing PLTE before IDAT");
}
}
-
#endif
+
else if (chunk_name == png_PLTE)
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
@@ -550,6 +550,7 @@
}
#endif
+
else
{
if (png_ptr->push_length + 4 > png_ptr->buffer_size)
diff --git a/pngpriv.h b/pngpriv.h
index e76a579..9b69f8c 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -1259,10 +1259,8 @@
png_uint_32 length));
#endif
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
-#endif
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
png_uint_32 chunk_name));
diff --git a/pngrtran.c b/pngrtran.c
index 5561852..96732b5 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.5.10 [March 8, 2012]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -1770,8 +1770,8 @@
int num_palette = png_ptr->num_palette;
int i;
- /*NOTE: there are other transformations that should probably be in here
- * too.
+ /* NOTE: there are other transformations that should probably be in
+ * here too.
*/
for (i = 0; i < num_palette; i++)
{
@@ -2277,7 +2277,7 @@
#endif
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
- /*NOTE: moved here in 1.5.4 (from much later in this list.) */
+ /* NOTE: moved here in 1.5.4 (from much later in this list.) */
if ((png_ptr->transformations & PNG_GRAY_TO_RGB) &&
(png_ptr->mode & PNG_BACKGROUND_IS_GRAY))
png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1);
@@ -2301,7 +2301,8 @@
#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
/* Added at libpng-1.5.10 */
- if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
+ if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
+ png_ptr->num_palette_max >= 0)
png_do_check_palette_indexes(png_ptr, row_info);
#endif
@@ -3302,7 +3303,7 @@
if (red != green || red != blue)
{
rgb_error |= 1;
- /*NOTE: this is the historical approach which simply
+ /* NOTE: this is the historical approach which simply
* truncates the results.
*/
*(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
diff --git a/pngset.c b/pngset.c
index e0118fa..8c07eec 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.5.10 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -149,7 +149,7 @@
* possible for 1/gamma to overflow the limit of 21474 and this means the
* gamma value must be at least 5/100000 and hence at most 20000.0. For
* safety the limits here are a little narrower. The values are 0.00016 to
- * 6250.0, which are truly ridiculous gammma values (and will produce
+ * 6250.0, which are truly ridiculous gamma values (and will produce
* displays that are all black or all white.)
*/
if (file_gamma < 16 || file_gamma > 625000000)
@@ -1291,8 +1291,10 @@
}
#endif /* PNG_BENIGN_ERRORS_SUPPORTED */
-#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED
- /* Do not report invalid palette index; added at libng-1.5.10 */
+#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
+/* Whether to report invalid palette index; added at libng-1.5.10
+ * allowed - one of 0: disable; 1: enable
+ */
void PNGAPI
png_set_check_for_invalid_index(png_structp png_ptr, int allowed)
{
diff --git a/pngstruct.h b/pngstruct.h
index 43a45cd..db0d4e4 100644
--- a/pngstruct.h
+++ b/pngstruct.h
@@ -1,11 +1,11 @@
/* pngstruct.h - header file for PNG reference library
*
- * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2012 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.)
*
- * Last changed in libpng 1.5.9 [March 29, 2012]
+ * Last changed in libpng 1.5.9 [February 18, 2012]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -248,6 +248,7 @@
#endif
#ifdef PNG_TIME_RFC1123_SUPPORTED
+ /* This is going to be unused in libpng16 and removed from libpng17 */
char time_buffer[29]; /* String to hold RFC 1123 time text */
#endif
diff --git a/pngtest.c b/pngtest.c
index 0295840..12af28d 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1817,4 +1817,4 @@
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_10 Your_png_h_is_not_version_1_5_10;
+typedef png_libpng_version_1_5_11 Your_png_h_is_not_version_1_5_11;
diff --git a/pngtrans.c b/pngtrans.c
index fef12f1..ee60957 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.5.10 [March 8, 2012]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -626,7 +626,7 @@
png_do_check_palette_indexes(png_structp png_ptr, png_row_infop row_info)
{
if (png_ptr->num_palette < (1 << row_info->bit_depth) &&
- png_ptr->num_palette_max >= 0)
+ png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */
{
/* Calculations moved outside switch in an attempt to stop different
* compiler warnings. 'padding' is in *bits* within the last byte, it is
@@ -708,7 +708,7 @@
{
for (; rp > png_ptr->row_buf; rp--)
{
- if (*rp >= png_ptr->num_palette_max)
+ if (*rp > png_ptr->num_palette_max)
png_ptr->num_palette_max = (int) *rp;
}
diff --git a/pngwrite.c b/pngwrite.c
index b587f1b..2a72ad3 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.5.10 [March 8, 2012]
+ * Last changed in libpng 1.5.11 [June 14, 2012]
* Copyright (c) 1998-2012 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.)
@@ -806,7 +806,8 @@
/* Added at libpng-1.5.10 */
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
/* Check for out-of-range palette index */
- if(row_info.color_type == PNG_COLOR_TYPE_PALETTE)
+ if (row_info.color_type == PNG_COLOR_TYPE_PALETTE &&
+ png_ptr->num_palette_max >= 0)
png_do_check_palette_indexes(png_ptr, &row_info);
#endif
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 938e7da..a5fc9e9 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
VisualStudio instructions
-libpng version 1.5.10 - March 29, 2012
+libpng version 1.5.11 - June 14, 2012
Copyright (c) 1998-2010 Glenn Randers-Pehrson
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index 0060f12..c3d7758 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
- * libpng version 1.5.10 - March 29, 2012
+ * libpng version 1.5.11 - June 14, 2012
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*
diff --git a/scripts/README.txt b/scripts/README.txt
index 46611a5..69256bf 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,9 +1,9 @@
-Makefiles for libpng version 1.5.10 - March 29, 2012
+Makefiles for libpng version 1.5.11 - June 14, 2012
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng15.so.15.1.5.10)
+ (gcc, creates libpng15.so.15.1.5.11)
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 @@
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
makefile.elf => Linux/ELF makefile symbol versioning,
- (gcc, creates libpng15.so.15.1.5.10)
+ (gcc, creates libpng15.so.15.1.5.11)
makefile.freebsd => FreeBSD makefile
makefile.gcc => Generic gcc makefile
makefile.hpgcc => HPUX makefile using gcc
@@ -35,12 +35,12 @@
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng15.so.15.1.5.10)
+ creates libpng15.so.15.1.5.11)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng15.so.15.1.5.10)
+ creates libpng15.so.15.1.5.11)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng15.so.15.1.5.10)
+ creates libpng15.so.15.1.5.11)
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 4dda9cd..fa30b6c 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.5.10
+version=1.5.11
prefix=""
libdir=""
libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index f96298c..f4cb137 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -5,6 +5,6 @@
Name: libpng
Description: Loads and saves PNG files
-Version: 1.5.10
+Version: 1.5.11
Libs: -L${libdir} -lpng15
Cflags: -I${includedir}
diff --git a/scripts/makefile.cegcc b/scripts/makefile.cegcc
index fbc3d78..1f08d8e 100644
--- a/scripts/makefile.cegcc
+++ b/scripts/makefile.cegcc
@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 5
-VERMIC = 10
+VERMIC = 11
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index 337a815..48805d4 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -15,10 +15,8 @@
exec_prefix=$(prefix)
# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
+ZLIBLIB=/usr/lib
+ZLIBINC=/usr/include
# Library name:
LIBNAME = libpng15
@@ -37,7 +35,7 @@
LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
-ARCH="-arch i386 -arch x86_64"
+ARCH=-arch ppc -arch i386 -arch x86_64
# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH)
@@ -107,7 +105,7 @@
$(CC) -dynamiclib \
-install_name $(LIBPATH)/$(LIBSOMAJ) \
-current_version 15 -compatibility_version 15 \
- -o $(LIBSOMAJ) \
+ $(ARCH) -o $(LIBSOMAJ) \
$(OBJSDLL) -L$(ZLIBLIB) -lz
pngtest: pngtest.o $(LIBSO)
@@ -136,10 +134,10 @@
install-shared: install-headers $(LIBSOMAJ) libpng.pc
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
-@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOREL)
+ -@$(RM_F) $(DL)/$(LIBSOMAJ)
-@$(RM_F) $(DL)/$(OLDSO)
- cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
- chmod 755 $(DL)/$(LIBSOREL)
+ cp $(LIBSOMAJ) $(DL)
+ chmod 755 $(DL)/$(LIBSOMAJ)
(cd $(DL); \
$(LN_SF) $(LIBSOREL) $(LIBSO); \
$(LN_SF) $(LIBSO) $(OLDSO))
diff --git a/scripts/makefile.freebsd b/scripts/makefile.freebsd
index 994608c..38cd921 100644
--- a/scripts/makefile.freebsd
+++ b/scripts/makefile.freebsd
@@ -11,8 +11,8 @@
LIB= png
SHLIB_MAJOR= ${SHLIB_VER}
SHLIB_MINOR= 0
-NOPROFILE= YES
-NOOBJ= YES
+NO_PROFILE= YES
+NO_OBJ= YES
# where make install puts libpng.a and png.h
DESTDIR= ${PREFIX}
@@ -25,7 +25,10 @@
SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
libpng/pngconf.h ${INCSDIR}/../pngconf.h \
libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
+
LDADD+= -lm -lz
+#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION >= 800000 ?
+
DPADD+= ${LIBM} ${LIBZ}
CFLAGS+= -I.
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index f1c75b6..7d3ebc7 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng15
PNGMAJ = 15
-RELEASE = 10
+RELEASE = 11
# Shared library names:
LIBSO=$(LIBNAME).so
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index c447f12..ce052da 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@
LIB= png15
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.5.10
+SHLIB_MINOR= 1.5.11
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 d154810..a62626f 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@
LIB= png
SHLIB_MAJOR= 15
-SHLIB_MINOR= 1.5.10
+SHLIB_MINOR= 1.5.11
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 3a1b84e..7c27ff6 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 15
-SHLIB_MINOR= 1.5.10
+SHLIB_MINOR= 1.5.11
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa
index f06eb66..794c203 100644
--- a/scripts/pnglibconf.dfa
+++ b/scripts/pnglibconf.dfa
@@ -21,7 +21,7 @@
# C compiler to generate 'pnglibconf.h' - a list of all the
# configuration options. The file lists the various options
# that can *only* be specified during the libpng build;
-# pnglibconf.h freezes the definitons selected for the specific
+# pnglibconf.h freezes the definitions selected for the specific
# build.
#
# The syntax is detailed in scripts/options.awk, this is a summary
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index 6facf39..c8b185f 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -3,7 +3,7 @@
/* pnglibconf.h - library build configuration */
-/* Libpng 1.5.10 - March 29, 2012 */
+/* Libpng 1.5.11 - June 14, 2012 */
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
diff --git a/scripts/symbols.def b/scripts/symbols.def
index bf958bc..beb35be 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -5,7 +5,7 @@
LIBRARY
EXPORTS
-;Version 1.5.10
+;Version 1.5.11
png_access_version_number @1
png_set_sig_bytes @2
png_sig_cmp @3