[devel] Imported from libpng-1.5.4.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index 40e7e04..2a9fb65 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,44 +1,38 @@
 
-Libpng 1.5.4rc01 - June 30, 2011
+Libpng 1.5.4 - July 7, 2011
 
-This is not intended to be a public release.  It will be replaced
-within a few weeks by a public version or by another test version.
+This is a public release of libpng, intended for use in production codes.
 
 Files available for download:
 
 Source files with LF line endings (for Unix/Linux) and with a
 "configure" script
 
-   1.5.4rc01.tar.xz (LZMA-compressed, recommended)
-   1.5.4rc01.tar.gz
-   1.5.4rc01.tar.bz2
+   libpng-1.5.4.tar.xz (LZMA-compressed, recommended)
+   libpng-1.5.4.tar.gz
+   libpng-1.5.4.tar.bz2
 
 Source files with CRLF line endings (for Windows), without the
 "configure" script
 
-   lp154r01.7z  (LZMA-compressed, recommended)
-   lp154r01.zip
+   lpng154.7z  (LZMA-compressed, recommended)
+   lpng154.zip
 
 Other information:
 
-   1.5.4rc01-README.txt
-   1.5.4rc01-LICENSE.txt
+   libpng-1.5.4-README.txt
+   libpng-1.5.4-LICENSE.txt
 
 Changes since the last public release (1.5.2):
 
-Version 1.5.3beta01 [April 1, 2011]
   Re-initialize the zlib compressor before compressing non-IDAT chunks.
   Added API functions to set parameters for zlib compression of non-IDAT
     chunks.
-
-Version 1.5.3beta02 [April 3, 2011]
   Updated scripts/symbols.def with new API functions.
   Only compile the new zlib re-initializing code when text or iCCP is
     supported, using PNG_WRITE_COMPRESSED_TEXT_SUPPORTED macro.
-  Improved the optimization of the zlib CMF byte (see libpng-1.2.6beta03).
+  Improved the optimization of the zlib CMF byte (see libpng-1.2.6).
   Optimize the zlib CMF byte in non-IDAT compressed chunks
-
-Version 1.5.3beta03 [April 16, 2011]
   Fixed gcc -ansi -pedantic compile. A strict ANSI system does not have
     snprintf, and the "__STRICT_ANSI__" detects that condition more reliably
     than __STDC__ (John Bowler).
@@ -52,9 +46,7 @@
   Fixed 64-bit builds where png_uint_32 is smaller than png_size_t in
     pngwutil.c (John Bowler).
   Fixed bug with stripping the filler or alpha channel when writing, that
-    was introduced in libpng-1.5.2beta01 (bug report by Andrew Church).
-
-Version 1.5.3beta04 [April 27, 2011]
+    was introduced in libpng-1.5.2 (bug report by Andrew Church).
   Updated pngtest.png with the new zlib CMF optimization.
   Cleaned up conditional compilation code and of background/gamma handling
     Internal changes only except a new option to avoid compiling the
@@ -75,8 +67,6 @@
     initialized the alpha channel twice.
   Changed png_struct jmp_buf member name from png_jmpbuf to tmp_jmpbuf to
     avoid a clash with the png_jmpbuf macro on some platforms.
-
-Version 1.5.3beta05 [May 6, 2011]
   Added appropriate feature test macros to ensure libpng sees the correct API
    _POSIX_SOURCE is defined in pngpriv.h, pngtest.c and pngvalid.c to ensure
     that POSIX conformant systems disable non-POSIX APIs.  _ISOC99_SOURCE is
@@ -89,19 +79,11 @@
     PNG_NO_WARNINGS does actually work now.
   Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte
     optimization configureable.
-  IDAT compression failed if preceded by a compressed text chunk (bug
-    introduced in libpng-1.5.3beta01-02).  This was because the attempt to
-    reset the zlib stream in png_write_IDAT happened after the first IDAT
-    chunk had been deflated - much too late.  In this change internal
-    functions were added to claim/release the z_stream and, hopefully, make
-    the code more robust.  Also deflateEnd checking is added - previously
+  Internal functions were added to claim/release the z_stream and, hopefully,
+    make the code more robust.  Also deflateEnd checking is added - previously
     libpng would ignore an error at the end of the stream.
-
-Version 1.5.3beta06 [May 8, 2011]
   Removed the -D_ALL_SOURCE from definitions for AIX in CMakeLists.txt
   Implemented premultiplied alpha support: png_set_alpha_mode API
-
-Version 1.5.3beta07 [May 11, 2011]
   Added expand_16 support to the high level interface.
   Added named value and 'flag' gamma support to png_set_gamma.  Made a minor
     change from the previous (unreleased) ABI/API to hide the exact value used
@@ -111,8 +93,6 @@
     that call png_set_unknown_chunks().
   Check for up->location !PNG_AFTER_IDAT when writing unknown chunks
     before IDAT.
-
-Version 1.5.3beta08 [May 16, 2011]
   Improved "pngvalid --speed" to exclude more of pngvalid from the time.
   Documented png_set_alpha_mode(), other changes in libpng.3/libpng-manual.txt
   The cHRM chunk now sets the defaults for png_set_rgb_to_gray() (when negative
@@ -128,15 +108,12 @@
   Minor cleanup and some extra checking in pngrutil.c and pngrtran.c. When
     expanding an indexed image, always expand to RGBA if transparency is
     present.
-
-Version 1.5.3beta09 [May 17, 2011]
- Reversed earlier 1.5.3 change of transformation order; move png_expand_16 back.
-   The change doesn't work because it requires 16-bit gamma tables when the code
-   only generates 8-bit ones.  This fails silently; the libpng code just doesn't
-   do any gamma correction.  Moving the tests back leaves the old, inaccurate,
-   8-bit gamma calculations, but these are clearly better than none!
-
-Version 1.5.3beta10 [May 20, 2011]
+  Reversed earlier 1.5.3 change of transformation order; move png_expand_16
+    back where it was.  The change doesn't work because it requires 16-bit
+    gamma tables when the code only generates 8-bit ones.  This fails
+    silently; the libpng code just doesn't do any gamma correction.  Moving
+    the tests back leaves the old, inaccurate, 8-bit gamma calculations, but
+    these are clearly better than none!
   png_set_background() and png_expand_16() did not work together correctly.
     This problem is present in 1.5.2; if png_set_background is called with
     need_expand false and the matching 16 bit color libpng erroneously just
@@ -146,15 +123,8 @@
   Added tests for expand16, more fixes for palette image tests to pngvalid.
     Corrects the code for palette image tests and disables attempts to
     validate palette colors.
-
-Version 1.5.3rc01 [June 3, 2011]
-  No changes.
-
-Version 1.5.3rc02 [June 8, 2011]
   Fixed uninitialized memory read in png_format_buffer() (Bug report by
     Frank Busse, related to CVE-2004-0421).
-
-Version 1.5.3beta11 [June 11, 2011]
   Fixed png_handle_sCAL which is broken in 1.5; added sCAL to pngtest.png
   Revised documentation about png_set_user_limits() to say that it also affects
     png writing.
@@ -180,29 +150,14 @@
   Removed string/memory macros that are no longer used and are not
     necessarily fully supportable, particularly png_strncpy and png_snprintf.
   Added log option to pngvalid.c and attempted to improve gamma messages.
-
-Version 1.5.3 [omitted]
   People found the presence of a beta release following an rc release
     to be confusing; therefore we bump the version to libpng-1.5.4beta01
     and there will be no libpng-1.5.3 release.
-
-Version 1.5.4beta01 [June 14, 2011]
-  Made it possible to undefine PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-    to get the same (inaccurate) output as libpng-1.5.2 and earlier.
   Moved definitions of PNG_HAVE_IHDR, PNG_AFTER_IDAT, and PNG_HAVE_PLTE
     outside of an unknown-chunk block in png.h because they are also
     needed for other uses.
-
-Version 1.5.4beta02 [June 14, 2011]
-  Fixed and clarified LEGACY 16-to-8 scaling code.
-  Added png_set_chop_16() API, to match inaccurate results from previous
-    libpng versions.
-  Removed the ACCURATE and LEGACY options (they are no longer useable)
-  Use the old scaling method for background if png_set_chop_16() was
-    called.
-  Made png_set_chop_16() API removeable with PNG_NO_READ_CHOP_16_TO_8_SUPPORTED
-
-Version 1.5.4beta03 [June 15, 2011]
+  Added png_set_scale_16() API, to match inaccurate results from previous
+    libpng versions, configurable with PNG_READ_SCALE_16_TO_8_SUPPORTED.
   Fixed a problem in png_do_expand_palette() exposed by optimization in
     1.5.3beta06
   Also removed a spurious and confusing "trans" member ("trans") from png_info.
@@ -210,40 +165,29 @@
     form if tRNS was present but alpha was marked to be stripped; this exposed
     a check for tRNS in png_do_expand_palette() which is inconsistent with the
     code elsewhere in libpng.
-  Correction to the expand_16 code; removed extra instance of
-    png_set_scale_16_to_8 from pngpriv.h
-
-Version 1.5.4beta04 [June 16, 2011]
-  Added a missing "#ifdef PNG_READ_BACKGROUND_SUPPORTED/#endif" in pngrtran.c
-  Added PNG_TRANSFORM_CHOP_16 to the high-level read transforms.
-  Made PNG_READ_16_TO_8_ACCURATE_SCALE configurable again.  If this is
-    not enabled, png_set_strip_16() and png_do_scale_16_to_8() aren't built.
-  Revised contrib/visupng, gregbook, and pngminim to demonstrate chop_16_to_8
-
-Version 1.5.4beta05 [June 16, 2011]
-  Renamed png_set_strip_16() to png_set_scale_16() and renamed
-    png_set_chop_16() to png_set_strip(16) in an attempt to minimize the
-    behavior changes between libpng14 and libpng15.
-
-Version 1.5.4beta06 [June 18, 2011]
-  Fixed new bug that was causing both strip_16 and scale_16 to be applied.
-
-Version 1.5.4beta07 [June 19, 2011]
+  Added PNG_TRANSFORM_SCALE_16 to the high-level read transforms.
+  If PNG_READ_16_TO_8_ACCURATE_SCALE is not enabled, png_set_scale_16()
+    and png_do_scale_16_to_8() aren't built.
+  Revised contrib/visupng, gregbook, and pngminim to demonstrate scale_16_to_8
   Fixed pngvalid, simplified macros, added checking for 0 in sCAL.
-    The ACCURATE scale macro is no longer defined in 1.5 - call the
+    The ACCURATE scale macro is no longer defined in libpng-1.5 - call the
     png_scale_16_to_8 API.  Made sure that PNG_READ_16_TO_8 is still defined
     if the png_strip_16_to_8 API is present.  png_check_fp_number now
     maintains some state so that positive, negative and zero values are
     identified.  sCAL uses these to be strictly spec conformant.
-
-Version 1.5.4beta08 [June 23, 2011]
-  Fixed pngvalid if ACCURATE_SCALE is defined.
-  Updated scripts/pnglibconf.h.prebuilt.
-
-Version 1.5.4rc01 [June 30, 2011]
   Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400.
 
-Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
+Send comments/corrections/commendations to png-mng-implement at lists.sf.net
+(subscription required; visit
+https://lists.sourceforge.net/lists/listinfo/png-mng-implement
+to subscribe)
+or to glennrp at users.sourceforge.net
+
+Glenn R-P
+*/ }
+#endif
+
+Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
 https://lists.sourceforge.net/lists/listinfo/png-mng-implement
 to subscribe) or to glennrp at users.sourceforge.net
diff --git a/CHANGES b/CHANGES
index 5313ab7..628d7f0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3506,6 +3506,8 @@
 Version 1.5.4rc01 [June 30, 2011]
   Define PNG_ALLOCATED to "restrict" only if MSC_VER >= 1400.
 
+Version 1.5.4 [July 7, 2011]
+
 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 a78f22d..cc15850 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -260,7 +260,7 @@
 # SET UP LINKS
 if(PNG_SHARED)
   set_target_properties(${PNG_LIB_NAME} PROPERTIES
-#   VERSION 15.${PNGLIB_RELEASE}.1.5.4rc01
+#   VERSION 15.${PNGLIB_RELEASE}.1.5.4
     VERSION 15.${PNGLIB_RELEASE}.0
     SOVERSION 15
     CLEAN_DIRECT_OUTPUT 1)
diff --git a/LICENSE b/LICENSE
index 854dc78..89f5243 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,7 +10,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.5.4rc01, June 30, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
 Copyright (c) 2004, 2006-2011 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
-June 30, 2011
+July 7, 2011
diff --git a/README b/README
index 747b311..71396a8 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.5.4rc01 - June 30, 2011 (shared library 15.0)
+README for libpng version 1.5.4 - July 7, 2011 (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 9b4e55f..54c5192 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.4rc01.
+# Generated by GNU Autoconf 2.68 for libpng 1.5.4.
 #
 # 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.4rc01'
-PACKAGE_STRING='libpng 1.5.4rc01'
+PACKAGE_VERSION='1.5.4'
+PACKAGE_STRING='libpng 1.5.4'
 PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
 PACKAGE_URL=''
 
@@ -1307,7 +1307,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.4rc01 to adapt to many kinds of systems.
+\`configure' configures libpng 1.5.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1377,7 +1377,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libpng 1.5.4rc01:";;
+     short | recursive ) echo "Configuration of libpng 1.5.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1485,7 +1485,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libpng configure 1.5.4rc01
+libpng configure 1.5.4
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1908,7 +1908,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.4rc01, which was
+It was created by libpng $as_me 1.5.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -2723,7 +2723,7 @@
 
 # Define the identity of the package.
  PACKAGE='libpng'
- VERSION='1.5.4rc01'
+ VERSION='1.5.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2787,7 +2787,7 @@
 
 
 
-PNGLIB_VERSION=1.5.4rc01
+PNGLIB_VERSION=1.5.4
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=5
 PNGLIB_RELEASE=4
@@ -13040,7 +13040,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.4rc01, which was
+This file was extended by libpng $as_me 1.5.4, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -13106,7 +13106,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.4rc01
+libpng config.status 1.5.4
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index fa0f4d3..f2800f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,12 +18,12 @@
 
 dnl Version number stuff here:
 
-AC_INIT([libpng], [1.5.4rc01], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.5.4], [png-mng-implement@lists.sourceforge.net])
 AM_INIT_AUTOMAKE
 dnl stop configure from automagically running automake
 AM_MAINTAINER_MODE
 
-PNGLIB_VERSION=1.5.4rc01
+PNGLIB_VERSION=1.5.4
 PNGLIB_MAJOR=1
 PNGLIB_MINOR=5
 PNGLIB_RELEASE=4
diff --git a/example.c b/example.c
index e7d2d2f..c0d27f4 100644
--- a/example.c
+++ b/example.c
@@ -2,7 +2,7 @@
 #if 0 /* in case someone actually tries to compile this */
 
 /* example.c - an example of using libpng
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 2011]
  * This file has been placed in the public domain by the authors.
  * Maintained 1998-2011 Glenn Randers-Pehrson
  * Maintained 1996, 1997 Andreas Dilger)
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 80240ec..c91b99c 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 version 1.5.4rc01 - June 30, 2011
+ libpng version 1.5.4 - July 7, 2011
  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.4rc01 - June 30, 2011
+ libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
@@ -4424,13 +4424,13 @@
 
 XIV. Y2K Compliance in libpng
 
-June 30, 2011
+July 7, 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.5.4rc01 are Y2K compliant.  It is my belief that earlier
+upward through 1.5.4 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 7762270..04518ca 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "June 30, 2011"
+.TH LIBPNG 3 "July 7, 2011"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4rc01
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4
 .SH SYNOPSIS
 \fI\fB
 
@@ -955,7 +955,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.5.4rc01 - June 30, 2011
+ libpng version 1.5.4 - July 7, 2011
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
@@ -966,7 +966,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.5.4rc01 - June 30, 2011
+ libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2011 Glenn Randers-Pehrson
 
@@ -5379,13 +5379,13 @@
 
 .SH XIV. Y2K Compliance in libpng
 
-June 30, 2011
+July 7, 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.5.4rc01 are Y2K compliant.  It is my belief that earlier
+upward through 1.5.4 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
@@ -5580,6 +5580,7 @@
  1.5.3 [omitted]
  1.5.4beta01-08      15    10504  15.so.15.4[.0]
  1.5.4rc01           15    10504  15.so.15.4[.0]
+ 1.5.4               15    10504  15.so.15.4[.0]
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -5636,7 +5637,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.5.4rc01 - June 30, 2011:
+Libpng version 1.5.4 - July 7, 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).
 
@@ -5659,7 +5660,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.5.4rc01, June 30, 2011, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 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
@@ -5758,7 +5759,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-June 30, 2011
+July 7, 2011
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 8c7c4f2..33c9ad3 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "June 30, 2011"
+.TH LIBPNGPF 3 "July 7, 2011"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4rc01
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.4
 (private functions)
 .SH SYNOPSIS
 \fB#include \fI"pngpriv.h"
diff --git a/png.5 b/png.5
index 2088066..0fca76e 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "June 30, 2011"
+.TH PNG 5 "July 7, 2011"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index fabec2d..eed3136 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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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.)
@@ -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_4rc01 Your_png_h_is_not_version_1_5_4rc01;
+typedef png_libpng_version_1_5_4 Your_png_h_is_not_version_1_5_4;
 
 /* 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
@@ -617,13 +617,13 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-     "libpng version 1.5.4rc01 - June 30, 2011" PNG_STRING_NEWLINE \
+     "libpng version 1.5.4 - July 7, 2011" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2011 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.4rc01 - June 30, 2011\
+      return "libpng version 1.5.4 - July 7, 2011\
       Copyright (c) 1998-2011 Glenn Randers-Pehrson\
       Copyright (c) 1996-1997 Andreas Dilger\
       Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
diff --git a/png.h b/png.h
index bd9cfb7..c655a51 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.5.4rc01 - June 30, 2011
+ * libpng version 1.5.4 - July 7, 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.5.4rc01 - June 30, 2011: Glenn
+ *   libpng versions 0.97, January 1998, through 1.5.4 - July 7, 2011: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -156,6 +156,7 @@
  *    1.5.3 [omitted]
  *    1.5.4beta01-08          15    10504  15.so.15.4[.0]
  *    1.5.4rc01               15    10504  15.so.15.4[.0]
+ *    1.5.4                   15    10504  15.so.15.4[.0]
  *
  *   Henceforth the source version will match the shared-library major
  *   and minor numbers; the shared-library major version number will be
@@ -187,7 +188,7 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.5.4rc01, June 30, 2011, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.4, July 7, 2011, are
  * Copyright (c) 2004, 2006-2011 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:
@@ -299,13 +300,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    June 30, 2011
+ *    July 7, 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.5.4rc01 are Y2K compliant.  It is my belief that
+ *    upward through 1.5.4 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
@@ -360,9 +361,9 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.5.4rc01"
+#define PNG_LIBPNG_VER_STRING "1.5.4"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.5.4rc01 - June 30, 2011\n"
+     " libpng version 1.5.4 - July 7, 2011\n"
 
 #define PNG_LIBPNG_VER_SONUM   15
 #define PNG_LIBPNG_VER_DLLNUM  15
@@ -375,7 +376,7 @@
  * PNG_LIBPNG_VER_STRING, omitting any leading zero:
  */
 
-#define PNG_LIBPNG_VER_BUILD  01
+#define PNG_LIBPNG_VER_BUILD  0
 
 /* Release Status */
 #define PNG_LIBPNG_BUILD_ALPHA    1
@@ -522,7 +523,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_4rc01;
+typedef char* png_libpng_version_1_5_4;
 
 /* 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 1c32415..222816e 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.5.4rc01 - June 30, 2011
+ * libpng version 1.5.4 - July 7, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngerror.c b/pngerror.c
index c9a1781..4d4ceba 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
 
 /* pngerror.c - stub functions for i/o and memory allocation
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngmem.c b/pngmem.c
index 7fd54eb..ea606d6 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngpriv.h b/pngpriv.h
index d770069..5b4d212 100644
--- a/pngpriv.h
+++ b/pngpriv.h
@@ -6,7 +6,7 @@
  * (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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 2011]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/pngread.c b/pngread.c
index 5527346..be3df47 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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 41e2d52..4e0401a 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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngrutil.c b/pngrutil.c
index 8510e99..07e46e2 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
 
 /* pngrutil.c - utilities to read a PNG file
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngset.c b/pngset.c
index 1c85f75..7eaad7d 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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngstruct.h b/pngstruct.h
index 98d4e76..93b2b3e 100644
--- a/pngstruct.h
+++ b/pngstruct.h
@@ -5,7 +5,7 @@
  * (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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 2011]
  *
  * This code is released under the libpng license.
  * For conditions of distribution and use, see the disclaimer
diff --git a/pngtest.c b/pngtest.c
index d8d27d7..9084ada 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,7 +1,7 @@
 
 /* pngtest.c - a simple test program to test libpng
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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.)
@@ -1794,4 +1794,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_5_4rc01 Your_png_h_is_not_version_1_5_4rc01;
+typedef png_libpng_version_1_5_4 Your_png_h_is_not_version_1_5_4;
diff --git a/pngtrans.c b/pngtrans.c
index 5dcbfb4..6a6908d 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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngvalid.c b/pngvalid.c
index 8be71f8..6d1736c 100644
--- a/pngvalid.c
+++ b/pngvalid.c
@@ -1,7 +1,7 @@
 
 /* pngvalid.c - validate libpng by constructing then reading png files.
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 2011]
  * Copyright (c) 2011 Glenn Randers-Pehrson
  * Written by John Cunningham Bowler
  *
diff --git a/pngwrite.c b/pngwrite.c
index 44b08df..d1af9e8 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.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngwtran.c b/pngwtran.c
index 7b4c053..124d708 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,7 +1,7 @@
 
 /* pngwtran.c - transforms the data in a row for PNG writers
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/pngwutil.c b/pngwutil.c
index 4e3a2cb..3ae5ed4 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * Last changed in libpng 1.5.4 [(PENDING RELEASE)]
+ * Last changed in libpng 1.5.4 [July 7, 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/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 3b9d361..cfdc43c 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.5.4rc01 - June 30, 2011
+libpng version 1.5.4 - July 7, 2011
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index fc7bd72..2128edd 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.4rc01 - June 30, 2011
+ * libpng version 1.5.4 - July 7, 2011
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index a0fd329..beb5fb8 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,9 +1,9 @@
 
-Makefiles for  libpng version 1.5.4rc01 - June 30, 2011
+Makefiles for  libpng version 1.5.4 - July 7, 2011
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng15.so.15.1.5.4rc01)
+                       (gcc, creates libpng15.so.15.1.5.4)
  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.4rc01)
+                       (gcc, creates libpng15.so.15.1.5.4)
  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.4rc01)
+                       creates libpng15.so.15.1.5.4)
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng15.so.15.1.5.4rc01)
+                       creates libpng15.so.15.1.5.4)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng15.so.15.1.5.4rc01)
+                       creates libpng15.so.15.1.5.4)
  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 ce599f7..a20e77e 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
 
 # Modeled after libxml-config.
 
-version=1.5.4rc01
+version=1.5.4
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index eee2ee5..ba70c3f 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.4rc01
+Version: 1.5.4
 Libs: -L${libdir} -lpng15
 Cflags: -I${includedir}
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index 652f544..d69781c 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@
 
 LIB=	png15
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.5.4rc01
+SHLIB_MINOR=	1.5.4
 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 5905cd1..ad713c9 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -17,7 +17,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	15
-SHLIB_MINOR=	1.5.4rc01
+SHLIB_MINOR=	1.5.4
 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 439a689..5fd7251 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -11,7 +11,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	15
-SHLIB_MINOR=	1.5.4rc01
+SHLIB_MINOR=	1.5.4
 
 LIB=	png
 SRCS=	png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa
index 53a5ef5..dfa7965 100644
--- a/scripts/pnglibconf.dfa
+++ b/scripts/pnglibconf.dfa
@@ -6,7 +6,7 @@
 #
 com pnglibconf.h - library build configuration
 com
-com libpng version 1.5.3 -  (PENDING RELEASE)
+com libpng version 1.5.3 -  July 7, 2011
 com
 com Copyright (c) 1998-2011 Glenn Randers-Pehrson
 com
diff --git a/scripts/symbols.def b/scripts/symbols.def
index 6c0fe4f..487f2b4 100644
--- a/scripts/symbols.def
+++ b/scripts/symbols.def
@@ -5,7 +5,7 @@
 LIBRARY
 
 EXPORTS
-;Version 1.5.4rc01
+;Version 1.5.4
  png_access_version_number @1
  png_set_sig_bytes @2
  png_sig_cmp @3