[libpng16] Imported from libpng-1.6.3beta06.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index bce14fb..eb8210d 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
 
-Libpng 1.6.3beta06 - May 10, 2013
+Libpng 1.6.3beta06 - May 12, 2013
 
 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.
@@ -69,12 +69,13 @@
   Added information in the documentation about problems with and fixes for
     the bad CRC and bad iTXt chunk situations.
 
-Version 1.6.3beta06 [May 10, 2013]
-  Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
-    supported (writes error message that it can't read P1 or P4 PBM files).
+Version 1.6.3beta06 [May 12, 2013]
+  Allow contrib/pngminus/pnm2png.c to compile without WRITE_INVERT and
+    WRITE_PACK supported (writes error message that it can't read P1 or
   Improved png-fix-too-far-back usage message, added --suffix option.
-  Revised contrib/pngminim/*/makefile to generated pnglibconf.h with the
-    right ZLIB_VERNUM.
+  Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the
+    right zlib header files.
+  Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/CHANGES b/CHANGES
index c40c6fa..e718063 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4552,12 +4552,14 @@
   Added information in the documentation about problems with and fixes for
     the bad CRC and bad iTXt chunk situations.
 
-Version 1.6.3beta06 [May 10, 2013]
-  Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
-    supported (writes error message that it can't read P1 or P4 PBM files).
+Version 1.6.3beta06 [May 12, 2013]
+  Allow contrib/pngminus/pnm2png.c to compile without WRITE_INVERT and
+    WRITE_PACK supported (writes error message that it can't read P1 or
+    P4 PBM files).
   Improved png-fix-too-far-back usage message, added --suffix option.
-  Revised contrib/pngminim/*/makefile to generated pnglibconf.h with the
-    right ZLIB_VERNUM.
+  Revised contrib/pngminim/*/makefile to generate pnglibconf.h with the
+    right zlib header files.
+  Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile
 
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net
 (subscription required; visit
diff --git a/LICENSE b/LICENSE
index bb154be..4e465f4 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.6.3beta06, May 9, 2013, are
+libpng versions 1.2.6, August 15, 2004, through 1.6.3beta06, May 12, 2013, 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
-May 9, 2013
+May 12, 2013
diff --git a/README b/README
index 6771e9e..427ff11 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.3beta06 - May 9, 2013 (shared library 16.0)
+README for libpng version 1.6.3beta06 - May 12, 2013 (shared library 16.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/contrib/pngminim/encoder/pngusr.dfa b/contrib/pngminim/encoder/pngusr.dfa
index 3f1b021..334d5e3 100644
--- a/contrib/pngminim/encoder/pngusr.dfa
+++ b/contrib/pngminim/encoder/pngusr.dfa
@@ -13,8 +13,9 @@
 # Switch on the write code - this makes a minimalist encoder
 
 option WRITE on
-option WRITE_INVERT on
-option WRITE_PACK on
+# These 2 options are required if you need to read PGM (P1 or P4) PGM files.
+# option WRITE_INVERT on
+# option WRITE_PACK on
 
 # You must choose fixed or floating point arithmetic:
 # option FLOATING_POINT on
diff --git a/contrib/pngminus/pnm2png.c b/contrib/pngminus/pnm2png.c
index ea3ef4d..f9903dd 100644
--- a/contrib/pngminus/pnm2png.c
+++ b/contrib/pngminus/pnm2png.c
@@ -210,7 +210,9 @@
   int           alpha_present;
   int           row, col;
   BOOL          raw, alpha_raw = FALSE;
+#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
   BOOL          packed_bitmap = FALSE;
+#endif
   png_uint_32   tmp16;
   int           i;
 
@@ -223,6 +225,7 @@
   }
   else if ((type_token[1] == '1') || (type_token[1] == '4'))
   {
+#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
     raw = (type_token[1] == '4');
     color_type = PNG_COLOR_TYPE_GRAY;
     get_token(pnm_file, width_token);
@@ -233,6 +236,10 @@
     height = (png_uint_32) ul_height;
     bit_depth = 1;
     packed_bitmap = TRUE;
+#else
+    fprintf (stderr, "PNM2PNG built without PNG_WRITE_INVERT_SUPPORTED and \n");
+    fprintf (stderr, "PNG_WRITE_PACK_SUPPORTED can't read PBM (P1,P4) files\n");
+#endif
   }
   else if ((type_token[1] == '2') || (type_token[1] == '5'))
   {
@@ -351,10 +358,12 @@
 
   alpha_present = (channels - 1) % 2;
 
+#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
   if (packed_bitmap)
     /* row data is as many bytes as can fit width x channels x bit_depth */
     row_bytes = (width * channels * bit_depth + 7) / 8;
   else
+#endif
     /* row_bytes is the width x number of channels x (bit-depth / 8) */
     row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
 
@@ -366,11 +375,14 @@
 
   for (row = 0; row < height; row++)
   {
+#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
     if (packed_bitmap) {
       for (i = 0; i < row_bytes; i++)
         /* png supports this format natively so no conversion is needed */
         *pix_ptr++ = get_data (pnm_file, 8);
-    } else {
+    } else
+#endif
+    {
       for (col = 0; col < width; col++)
       {
         for (i = 0; i < (channels - alpha_present); i++)
@@ -421,11 +433,13 @@
     return FALSE;
   }
 
+#if defined(PNG_WRITE_INVERT_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
   if (packed_bitmap == TRUE)
   {
     png_set_packing (png_ptr);
     png_set_invert_mono (png_ptr);
   }
+#endif
 
   /* setjmp() must be called in every function that calls a PNG-reading libpng function */
   if (setjmp (png_jmpbuf(png_ptr)))
diff --git a/contrib/tools/png-fix-too-far-back.c b/contrib/tools/png-fix-too-far-back.c
index f187c18..5f2b560 100644
--- a/contrib/tools/png-fix-too-far-back.c
+++ b/contrib/tools/png-fix-too-far-back.c
@@ -16,6 +16,8 @@
 #include <string.h>
 #include <ctype.h>
 
+#define PROGRAM_NAME "png-fix-too-far-back"
+
 /* Define the following to use this program against your installed libpng,
  * rather than the one being built here:
  */
@@ -822,7 +824,7 @@
    }
 
    /* With no arguments just check this file */
-   if (optimize == 0 && strip == 0 && output == NULL)
+   if (optimize == 0 && strip == 0 && inplace == 0 && output == NULL)
       return !read_png(fpIn);
 
    /* Otherwise, maybe, fix it */
@@ -981,77 +983,109 @@
 static void
 usage(const char *prog, int rc)
 {
-   fprintf(stderr,
-      "Usage: %s {[options] png-file}\n", prog);
-   fprintf(stderr,
-      "  Tests, optimizes and fixes the zlib header in PNG files.\n"
-      "  Optionally, when fixing, strips ancilliary chunks from the file.\n");
-   fprintf(stderr,
-      "\nOptions:\n"
-#  ifdef PNG_MAXIMUM_INFLATE_WINDOW
-      "  --test: Test the PNG_MAXIMUM_INFLATE_WINDOW option.\n"
-#  endif
-      "  --optimize (-o): Find the smallest deflate window size for the file.\n"
-      "                   Also outputs a summary for each file.\n"
-      "  --strip (-s): Remove chunks except for IHDR, PLTE, IEND, tRNS, gAMA,\n"
-      "                sRGB.  If given twice remove gAMA and sRGB as well.\n"
-      "  --errors (-e): Output errors from libpng (except too-far-back).\n");
-   fprintf(stderr,
-      "  --warnings (-w): Output warnings from libpng.\n"
-      "  --verbose (-v): Output more verbose messages.\n"
-      "  --max=<number>: Output IDAT chunks sized <number>.  If not given the\n"
-      "                  the IDAT chunks will be the maximum size permitted\n"
-      "                  (2^31-1 bytes.)\n"
-      "  --out=<file>: Save the result for the next PNG to <file>.\n"
-      "  --inplace (-i): Modify the file in place.\n");
-   fprintf(stderr,
-      "\nExit codes:\n"
-      "  0: Success, all files pass the test, all output written ok.\n"
-      "  1: At least one file had a read error, all files checked.\n"
-      "  2: A file had an unrecoverable error (integer overflow, bad format),\n"
-      "     the program exited immediately, without processing further files.\n"
-      "  3: An IO or out of memory error, or a file could not be opened.h\n");
-   fprintf(stderr,
-      "\nDescription:\n"
-      "  %s checks each PNG file on the command line for errors.\n"
-      "  By default it is silent and just exits with an error code (as above)\n"
-      "  if any error is detected.  With --optimize, --strip or --out,\n"
-      "  however, the zlib \"invalid distance too far back\" error is fixed\n"
-      "  and the program exits with a 0 success code unless some other error\n"
-      "  is encountered.\n"
-      "\n", prog);
-   fprintf(stderr,
-      "  Use --errors to display the other errors, use --optimize to test\n"
-      "  different values for the deflate \"window bits\" parameter and find\n"
-      "  the smallest that works.\n"
-      "\n"
-      "  Notice that some PNG files with the zlib header problem can still be\n"
-      "  read by libpng.  This program will still detect the error.\n"
-      "\n");
-   fprintf(stderr,
-      "  The output produced with --optimize is as follows:\n"
-      "\n"
-      "     opt-bits curr-bits image-bits opt-flag opt-type change file\n"
-      "\n"
-      "   opt-bits:   The minimum window bits (8-15) that works, if the file\n"
-      "               is written this is the value that will be stored.\n"
-      "   curr-bits:  The value currently stored in the file.\n");
-   fprintf(stderr,
-      "   image-bits: The window bits value corresponding to the size of the\n"
-      "               uncompressed PNG image data.  When --optimize is not\n"
-      "               given but --strip is, this value will be used if lower\n"
-      "               than the current value.\n"
-      "   opt-flag: < if the optimized bit value is less than that implied by\n"
-      "               the PNG image size (opt-bits < image-bits)\n"
-      "             = if optimization is not possible (opt-bits = image-bits)\n"
-      "   opt-type: reduce   if opts-bits < curr-bits\n");
-   fprintf(stderr,
-      "             ok       if opt-bits = curr-bits (no change required)\n"
-      "             INCREASE if opt-bits > curr-bits (the file has the bug)\n"
-      "   change:     opt-bits - curr-bits, so negative if optimization is\n"
-      "               possible, 0 if no change is required, positive if the\n"
-      "               bug is present.\n"
-      "   file:       The file name.\n");
+   /* ANSI C-90 limits strings to 509 characters, so use a string array: */
+   size_t i;
+   static const char *usage_string[] = {
+"  Tests, optimizes and optionally fixes the zlib header in PNG files.\n",
+"  Optionally, when fixing, strips ancilliary chunks from the file.\n",
+"\n",
+"OPTIONS\n",
+"  OPERATION\n",
+"      By default files are just checked for readability.\n",
+"    --optimize (-o):\n",
+"      Find the smallest deflate window size for the file, also outputs\n",
+"      a summary of the result for each file.\n",
+"    --strip (-s):\n",
+"      Remove chunks except for IHDR, PLTE, IEND, tRNS, gAMA, sRGB.  If\n",
+"      given twice remove gAMA and sRGB as well.\n",
+"    --max=<number>:\n",
+"      Use IDAT chunks sized <number>.  If not given the the IDAT\n",
+"      chunks will be the maximum size permitted; 2^31-1 bytes.\n",
+"  MESSAGES\n",
+"      By default the program is silent.\n",
+"    --errors (-e):\n",
+"      Output errors from libpng (except too-far-back).\n",
+"    --warnings (-w):\n",
+"      Output warnings from libpng.\n",
+"    --verbose (-v):\n",
+"      Describe program progress (refer to the source).\n",
+"  OUTPUT\n",
+"      By default nothing is written.\n",
+"    --out=<file>:\n",
+"      Write the optimized/corrected version of the next PNG to\n",
+"      <file>.  This overrides the following two options\n",
+"    --suffix=<suffix>:\n",
+"      Set --out=<name><suffix> for all following files, unless\n",
+"      overridden on a per-file basis by explicit --out.  If no\n",
+"      --suffix= value is given behaves as --inplace.\n",
+"    --inplace (-i):\n",
+"      Modify the file in place.  THIS IS DANGEROUS - please keep a\n",
+"      backup of the file because a program interrupt or bug will\n",
+"      result in a corrupted file.\n",
+#ifdef PNG_MAXIMUM_INFLATE_WINDOW
+"  INTERNAL OPTIONS\n",
+"    --test:\n",
+"      Test the PNG_MAXIMUM_INFLATE_WINDOW option.  Setting this\n",
+"      disables output as this would produce a broken file.\n",
+#endif
+"\n",
+"EXIT CODES\n",
+"  0: Success, all files pass the test, any output written ok.\n",
+"  1: At least one file had a read error, all files checked.\n",
+"  2: A file had an unrecoverable error (integer overflow, bad format),\n",
+"     the program exited immediately, without processing further files.\n",
+"  3: An IO or out of memory error, or a file could not be opened.h\n",
+"\n",
+"DESCRIPTION\n",
+"  " PROGRAM_NAME " checks each PNG file on the command line\n",
+"  for errors.  By default it is silent and just returns an exit code\n",
+"  (as above).  Options allow the zlib error:\n",
+"\n",
+"        \"invalid distance too far back\"\n",
+"\n",
+"  to be fixed during the read and therefore test the file for other\n",
+"  errors that may prevent reading.\n",
+"\n",
+"  Setting one of the \"OUTPUT\" options causes the possibly modified\n",
+"  file to be written to a new file or, with --inplace, to the existing\n",
+"  file.\n",
+"\n",
+"  IMPORTANT: --inplace will overwrite the original file, if you use it\n",
+"  be sure to keep a backup of the original file, this program can fail\n",
+"  during the write and has been known to have serious bugs!  A failure\n",
+"  during write will certainly damage the original file.\n",
+"\n",
+"  Notice that some PNG files with the zlib header problem can still be\n",
+"  read by libpng under some circumstances.  This program will still\n",
+"  detect and, if requested, correct the error.\n",
+"\n",
+"  The output produced with --optimize is as follows:\n",
+"\n",
+"     opt-bits curr-bits image-bits opt-flag opt-type change file\n",
+"\n",
+"   opt-bits:   The minimum window bits (8-15) that works, if the file\n",
+"               is written this is the value that will be stored.\n",
+"   curr-bits:  The value currently stored in the file.\n",
+"   image-bits: The window bits value corresponding to the size of the\n",
+"               uncompressed PNG image data.  When --optimize is not\n",
+"               given but --strip is, this value will be used if lower\n",
+"               than the current value.\n",
+"   opt-flag: < if the optimized bit value is less than that implied by\n",
+"               the PNG image size (opt-bits < image-bits)\n",
+"             = if optimization is not possible (opt-bits = image-bits)\n",
+"   opt-type: reduce   if opts-bits < curr-bits\n",
+"             ok       if opt-bits = curr-bits (no change required)\n",
+"             INCREASE if opt-bits > curr-bits (the file has the bug)\n",
+"   change:     opt-bits - curr-bits, so negative if optimization is\n",
+"               possible, 0 if no change is required, positive if the\n",
+"               bug is present.\n",
+"   file:       The file name.\n",
+};
+
+   fprintf(stderr, "Usage: %s {[options] png-file}\n", prog);
+
+   for (i=0; i < (sizeof usage_string)/(sizeof usage_string[0]); ++i)
+      fputs(usage_string[i], stderr);
 
    exit(rc);
 }
@@ -1063,6 +1097,7 @@
    png_uint_32 max_IDAT = 0x7fffffff;
    FILE *fp;
    const char *outfile = NULL;
+   const char *suffix = NULL;
    const char *prog = *argv;
    static const png_byte idat_bytes[4] = { 73,  68,  65,  84 };
    static const png_byte iend_bytes[4] = { 73,  69,  78,  68 };
@@ -1111,6 +1146,9 @@
       else if (strncmp(*argv, "--out=", 6) == 0)
          outfile = 6+*argv;
 
+      else if (strncmp(*argv, "--suffix=", 9) == 0)
+         suffix = 9+*argv;
+
       else if (strcmp(*argv, "--strip") == 0 || strcmp(*argv, "-s") == 0)
          ++strip;
 
@@ -1133,10 +1171,43 @@
 
       else
       {
-         int ret;
+         int ret, overwrite;
+
+         if (outfile != NULL)
+            overwrite = 0;
+
+         else if (suffix != NULL)
+         {
+            if (*suffix == 0)
+               overwrite = 1;
+
+            else
+            {
+               static char temp_name[FILENAME_MAX];
+               size_t filelen = strlen(*argv);
+               size_t suffixlen = strlen(suffix);
+
+               if (filelen + suffixlen >= FILENAME_MAX)
+               {
+                  fprintf(stderr, "%s: output file name too long: %s%s\n", prog,
+                     *argv, suffix);
+                  exit(3);
+               }
+
+               memcpy(temp_name, *argv, filelen);
+               memcpy(temp_name+filelen, suffix, suffixlen);
+               temp_name[filelen+suffixlen] = 0;
+
+               outfile = temp_name;
+               overwrite = 0;
+             }
+         }
+
+         else
+            overwrite = inplace;
 
          err +=
-            fix_file(fp, *argv, max_IDAT, inplace, strip, optimize, outfile);
+            fix_file(fp, *argv, max_IDAT, overwrite, strip, optimize, outfile);
 
          if (fpIn != NULL)
          {
diff --git a/libpng-manual.txt b/libpng-manual.txt
index e65d38e..77b087c 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.6.3beta06 - May 9, 2013
+ libpng version 1.6.3beta06 - May 12, 2013
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2013 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.6.3beta06 - May 9, 2013
+ libpng versions 0.97, January 1998, through 1.6.3beta06 - May 12, 2013
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2013 Glenn Randers-Pehrson
 
@@ -5212,7 +5212,7 @@
 
 XVI. Y2K Compliance in libpng
 
-May 9, 2013
+May 12, 2013
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
diff --git a/libpng.3 b/libpng.3
index 5abb84e..5bbe5b8 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "May 9, 2013"
+.TH LIBPNG 3 "May 12, 2013"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.3beta06
 .SH SYNOPSIS
@@ -504,7 +504,7 @@
 .SH LIBPNG.TXT
 libpng-manual.txt - A description on how to use and modify libpng
 
- libpng version 1.6.3beta06 - May 9, 2013
+ libpng version 1.6.3beta06 - May 12, 2013
  Updated and distributed by Glenn Randers-Pehrson
  <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2013 Glenn Randers-Pehrson
@@ -515,7 +515,7 @@
 
  Based on:
 
- libpng versions 0.97, January 1998, through 1.6.3beta06 - May 9, 2013
+ libpng versions 0.97, January 1998, through 1.6.3beta06 - May 12, 2013
  Updated and distributed by Glenn Randers-Pehrson
  Copyright (c) 1998-2013 Glenn Randers-Pehrson
 
@@ -5717,7 +5717,7 @@
 
 .SH XVI. Y2K Compliance in libpng
 
-May 9, 2013
+May 12, 2013
 
 Since the PNG Development group is an ad-hoc body, we can't make
 an official declaration.
@@ -5994,7 +5994,7 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.6.3beta06 - May 9, 2013:
+Libpng version 1.6.3beta06 - May 12, 2013:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
 Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
@@ -6017,7 +6017,7 @@
 
 This code is released under the libpng license.
 
-libpng versions 1.2.6, August 15, 2004, through 1.6.3beta06, May 9, 2013, are
+libpng versions 1.2.6, August 15, 2004, through 1.6.3beta06, May 12, 2013, 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
@@ -6116,7 +6116,7 @@
 
 Glenn Randers-Pehrson
 glennrp at users.sourceforge.net
-May 9, 2013
+May 12, 2013
 
 .\" end of man page
 
diff --git a/libpngpf.3 b/libpngpf.3
index 0a5460b..7f6a3c9 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,4 +1,4 @@
-.TH LIBPNGPF 3 "May 9, 2013"
+.TH LIBPNGPF 3 "May 12, 2013"
 .SH NAME
 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.3beta06
 (private functions)
diff --git a/png.5 b/png.5
index aeb503c..4ee4e1f 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "May 9, 2013"
+.TH PNG 5 "May 12, 2013"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 735199d..e1a541c 100644
--- a/png.c
+++ b/png.c
@@ -768,13 +768,13 @@
 #else
 #  ifdef __STDC__
    return PNG_STRING_NEWLINE \
-     "libpng version 1.6.3beta06 - May 9, 2013" PNG_STRING_NEWLINE \
+     "libpng version 1.6.3beta06 - May 12, 2013" PNG_STRING_NEWLINE \
      "Copyright (c) 1998-2013 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.6.3beta06 - May 9, 2013\
+      return "libpng version 1.6.3beta06 - May 12, 2013\
       Copyright (c) 1998-2013 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 ddf3b05..8af911d 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
 
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.6.3beta06 - May 9, 2013
+ * libpng version 1.6.3beta06 - May 12, 2013
  * Copyright (c) 1998-2013 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.6.3beta06 - May 9, 2013: Glenn
+ *   libpng versions 0.97, January 1998, through 1.6.3beta06 - May 12, 2013: Glenn
  *   See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -207,7 +207,7 @@
  *
  * This code is released under the libpng license.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.6.3beta06, May 9, 2013, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.6.3beta06, May 12, 2013, are
  * Copyright (c) 2004, 2006-2013 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:
@@ -319,7 +319,7 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    May 9, 2013
+ *    May 12, 2013
  *
  *    Since the PNG Development group is an ad-hoc body, we can't make
  *    an official declaration.
@@ -387,7 +387,7 @@
 /* Version information for png.h - this should match the version in png.c */
 #define PNG_LIBPNG_VER_STRING "1.6.3beta06"
 #define PNG_HEADER_VERSION_STRING \
-     " libpng version 1.6.3beta06 - May 9, 2013\n"
+     " libpng version 1.6.3beta06 - May 12, 2013\n"
 
 #define PNG_LIBPNG_VER_SONUM   16
 #define PNG_LIBPNG_VER_DLLNUM  16
diff --git a/pngconf.h b/pngconf.h
index 169fb3b..153f1f7 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.6.3beta06 - May 9, 2013
+ * libpng version 1.6.3beta06 - May 12, 2013
  *
  * Copyright (c) 1998-2013 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt
index 0f380fa..590a310 100644
--- a/projects/vstudio/readme.txt
+++ b/projects/vstudio/readme.txt
@@ -1,7 +1,7 @@
 
 VisualStudio instructions
 
-libpng version 1.6.3beta06 - May 9, 2013
+libpng version 1.6.3beta06 - May 12, 2013
 
 Copyright (c) 1998-2010 Glenn Randers-Pehrson
 
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index e4bd277..50f7511 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
 <!--
  * zlib.props - location of zlib source
  *
- * libpng version 1.6.3beta06 - May 9, 2013
+ * libpng version 1.6.3beta06 - May 12, 2013
  *
  * Copyright (c) 1998-2011 Glenn Randers-Pehrson
  *
diff --git a/scripts/README.txt b/scripts/README.txt
index cbc2863..d4a367c 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,5 +1,5 @@
 
-Makefiles for  libpng version 1.6.3beta06 - May 9, 2013
+Makefiles for  libpng version 1.6.3beta06 - May 12, 2013
 
 pnglibconf.h.prebuilt       =>  Stores configuration settings
  makefile.linux    =>  Linux/ELF makefile
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index 9fc7aab..46e3c9b 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -2,7 +2,7 @@
 
 /* pnglibconf.h - library build configuration */
 
-/* Libpng version 1.6.3beta06 - May 9, 2013 */
+/* Libpng version 1.6.3beta06 - May 12, 2013 */
 
 /* Copyright (c) 1998-2013 Glenn Randers-Pehrson */