[libpng10] Imported from libpng-1.0.18.tar
diff --git a/ANNOUNCE b/ANNOUNCE
index b317fd6..3ab1cd0 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,27 +1,31 @@
 
-Libpng 1.0.17 - September 12, 2004
+Libpng 1.0.18 - December 3, 2004
 
 This is a public release of libpng, intended for use in production codes.
 
-Changes since the last public release (1.0.16):
+Changes since the last public release (1.0.17):
 
-  Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
-  Removed unused pngasmrd.h file.
-  Removed references to uu.net for archived files.  Added references to
-    PNG Spec (second edition) and the PNG ISO/IEC Standard.
-  Added "test-dd" target in 15 makefiles, to run pngtest in DESTDIR.
-  Fixed bug with "optimized window size" in the IDAT datastream, that
-    causes libpng to write PNG files with incorrect zlib header bytes.
-  Fixed bug with sCAL chunk and big-endian machines (David Munro).
-  Undid new code added in 1.2.6 to update the color_type in
-    png_set_filler().
-  Revised png_set_strip_filler() to not remove alpha if color_type has alpha.
-  Added makefile.hp64
-  Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
+  Fixed bug in png_text_compress() that would fail to complete a large block.
+  Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
+    strip alpha operation in png_do_strip_filler().
+  #ifdef out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0)
+  Reduce color_type to a nonalpha type after strip alpha operation in
+    png_do_strip_filler().
+  Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM
+  Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin).
+  Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin).
+  Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection
+    of data type in deflate (Cosmin).
+  Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of
+    PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
+  Despammed mailing addresses by masking "@" with "at".
+  Added scripts/makefile.elf with supporting code in pngconf.h for symbol
+    versioning (John Bowler).
+  Added projects/visualc71 (Simon-pierre).
 
 Send comments/corrections/commendations to
-png-implement@ccrc.wustl.edu (subscription required; write to
-majordomo@ccrc.wustl.edu with "subscribe png-implement" in the message)
-or to glennrp@users.sourceforge.net
+png-implement at ccrc.wustl.edu (subscription required; write to
+majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
+or to glennrp at users.sourceforge.net
 
 Glenn R-P
diff --git a/CHANGES b/CHANGES
index 109583e..3cc176d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1354,10 +1354,55 @@
 version 1.0.17 and 1.2.7 [September 12, 2004]
   Added makefile.hp64
   Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
+version 1.2.8beta1 [November 1, 2004]
+  Fixed bug in png_text_compress() that would fail to complete a large block.
+  Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
+    strip alpha operation in png_do_strip_filler().
+  #ifdef out png_info_init in png.c and png_read_init in pngread.c (as of 1.3.0)
+version 1.2.8beta2 [November 2, 2004]
+  Reduce color_type to a nonalpha type after strip alpha operation in
+    png_do_strip_filler().
+version 1.2.8beta3 [November 3, 2004]
+  Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM
+version 1.2.8beta4 [November 12, 2004]
+  Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin).
+  Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin).
+  Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection
+    of data type in deflate (Cosmin).
+  Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of
+    PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
+version 1.2.8beta5 [November 20, 2004]
+  Use png_ptr->flags instead of png_ptr->transformations to pass
+    PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI
+    compatibility.
+  Revised handling of SPECIALBUILD, PRIVATEBUILD, 
+    PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
+version 1.2.8rc1 [November 24, 2004]
+  Moved handling of BUILD macros from pngconf.h to png.h
+  Added definition of PNG_LIBPNG_BASE_TYPE in png.h, inadvertently
+    omitted from beta5.
+  Revised scripts/pngw32.rc
+  Despammed mailing addresses by masking "@" with "at".
+  Inadvertently installed a supposedly faster test version of pngrutil.c
+version 1.2.8rc2 [November 26, 2004]
+  Added two missing "\" in png.h
+  Change tests in pngread.c and pngpread.c to
+    if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
+       png_do_read_transformations(png_ptr);
+version 1.2.8rc3 [November 28, 2004]
+  Reverted pngrutil.c to version libpng-1.2.8beta5.
+  Added scripts/makefile.elf with supporting code in pngconf.h for symbol
+    versioning (John Bowler).
+version 1.2.8rc4 [November 29, 2004]
+  Added projects/visualc7 (Simon-pierre).
+version 1.2.8rc5 [November 29, 2004]
+  Fixed new typo in scripts/pngw32.rc
+version 1.2.8 [December 3, 2004]
+  Removed projects/visualc7, added projects/visualc71.
 
 Send comments/corrections/commendations to
-png-implement@ccrc.wustl.edu (subscription required; write to
-majordomo@ccrc.wustl.edu with "subscribe png-implement" in the message)
-or to glennrp@users.sourceforge.net
+png-implement at ccrc.wustl.edu (subscription required; write to
+majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message)
+or to glennrp at users.sourceforge.net
 
 Glenn R-P
diff --git a/INSTALL b/INSTALL
index d55c83a..a04ee40 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 
-Installing libpng version 1.0.17 - September 12, 2004
+Installing libpng version 1.0.18 - December 3, 2004
 
 Before installing libpng, you must first install zlib.  zlib
 can usually be found wherever you got libpng.  zlib can be
@@ -10,7 +10,7 @@
 version of zlib that's installed.
 
 You can rename the directories that you downloaded (they
-might be called "libpng-1.0.17" or "lpng109" and "zlib-1.2.1"
+might be called "libpng-1.0.18" or "lpng109" and "zlib-1.2.1"
 or "zlib121") so that you have directories called "zlib" and "libpng".
 
 Your directory structure should look like this:
@@ -66,10 +66,12 @@
 include
 
  makefile.std      =>  Generic UNIX makefile (cc, creates static libpng.a)
+ makefile.elf      =>  Linux/ELF makefile symbol versioning,
+                       gcc, creates libpng10.so.0.1.0.18)
  makefile.linux    =>  Linux/ELF makefile
-                       (gcc, creates libpng10.so.0.1.0.17)
+                       (gcc, creates libpng10.so.0.1.0.18)
  makefile.gcmmx    =>  Linux/ELF makefile
-                       (gcc, creates libpng10.so.0.1.0.17,
+                       (gcc, creates libpng10.so.0.1.0.18,
                        uses assembler code tuned for Intel MMX platform)
  makefile.gcc      =>  Generic makefile (gcc, creates static libpng.a)
  makefile.knr      =>  Archaic UNIX Makefile that converts files with
@@ -92,12 +94,12 @@
  makefile.openbsd  =>  OpenBSD makefile
  makefile.sgi      =>  Silicon Graphics IRIX makefile (cc, creates static lib)
  makefile.sggcc    =>  Silicon Graphics (gcc,
-                       creates libpng10.so.0.1.0.17)
+                       creates libpng10.so.0.1.0.18)
  makefile.sunos    =>  Sun makefile
  makefile.solaris  =>  Solaris 2.X makefile (gcc,
-                       creates libpng10.so.0.1.0.17)
+                       creates libpng10.so.0.1.0.18)
  makefile.so9      =>  Solaris 9 makefile (gcc,
-                       creates libpng10.so.0.1.0.17)
+                       creates libpng10.so.0.1.0.18)
  makefile.32sunu   =>  Sun Ultra 32-bit makefile
  makefile.64sunu   =>  Sun Ultra 64-bit makefile
  makefile.sco      =>  For SCO OSr5  ELF and Unixware 7 with Native cc
diff --git a/KNOWNBUG b/KNOWNBUG
index 9232aa5..cb707f9 100644
--- a/KNOWNBUG
+++ b/KNOWNBUG
@@ -1,5 +1,5 @@
 
-Known bugs in libpng version 1.0.17
+Known bugs in libpng version 1.0.18
 
 1. April 22, 2001: pnggccrd.c has been reported to crash on NetBSD when
    reading interlaced PNG files, when assembler code is enabled but running
diff --git a/LICENSE b/LICENSE
index 3e5a36a..fe3ac4b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -8,7 +8,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng version 1.2.6, September 12, 2004, is
+libpng version 1.2.6, December 3, 2004, is
 Copyright (c) 2004 Glenn Randers-Pehrson, and is
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -105,5 +105,5 @@
 certification mark of the Open Source Initiative.
 
 Glenn Randers-Pehrson
-glennrp@users.sourceforge.net
-September 12, 2004
+glennrp at users.sourceforge.net
+December 3, 2004
diff --git a/README b/README
index af74e71..07b2adc 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.0.17 - September 12, 2004 (shared library 10.0)
+README for libpng version 1.0.18 - December 3, 2004 (shared library 10.0)
 See the note about version numbers near the top of png.h
 
 See INSTALL for instructions on how to install libpng.
@@ -103,17 +103,17 @@
 This release was created and will be supported by myself (of course
 based in a large way on Guy's and Andreas' earlier work), and the PNG group.
 
-glennrp@users.sourceforge.net
-png-implement@ccrc.wustl.edu (subscription required; write to
-majordomo@ccrc.wustl.edu with "subscribe png-implement" in the message).
+glennrp at users.sourceforge.net
+png-implement at ccrc.wustl.edu (subscription required; write to
+majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
 
 You can't reach Guy, the original libpng author, at the addresses
 given in previous versions of this document.  He and Andreas will read mail
 addressed to the png-implement list, however.
 
 Please do not send general questions about PNG.  Send them to
-the (png-list@ccrc.wustl.edu, subscription required, write to
-majordomo@ccrc.wustl.edu with "subscribe png-list" in your message).
+the (png-list at ccrc.wustl.edu, subscription required, write to
+majordomo at ccrc.wustl.edu with "subscribe png-list" in your message).
 On the other hand,
 please do not send libpng questions to that address, send them to me
 or to the png-implement list.  I'll
@@ -188,10 +188,12 @@
       scripts       =>  Directory containing scripts for building libpng:
        descrip.mms      =>  VMS makefile for MMS or MMK
        makefile.std     =>  Generic UNIX makefile (cc, creates static libpng.a)
+       makefile.elf     =>  Linux/ELF makefile symbol versioning,
+                            gcc, creates libpng10.so.0.1.0.18)
        makefile.linux   =>  Linux/ELF makefile
-                            (gcc, creates libpng10.so.0.1.0.17)
+                            (gcc, creates libpng10.so.0.1.0.18)
        makefile.gcmmx   =>  Linux/ELF makefile
-                            (gcc, creates libpng10.so.0.1.0.17,
+                            (gcc, creates libpng10.so.0.1.0.18,
                             uses assembler code tuned for Intel MMX platform)
        makefile.gcc     =>  Generic makefile (gcc, creates static libpng.a)
        makefile.knr     =>  Archaic UNIX Makefile that converts files with
@@ -213,12 +215,12 @@
        makefile.openbsd =>  OpenBSD makefile
        makefile.sgi     =>  Silicon Graphics IRIX (cc, creates static lib)
        makefile.sggcc   =>  Silicon Graphics
-                            (gcc, creates libpng10.so.0.1.0.17)
+                            (gcc, creates libpng10.so.0.1.0.18)
        makefile.sunos   =>  Sun makefile
        makefile.solaris =>  Solaris 2.X makefile
-                            (gcc, creates libpng10.so.0.1.0.17)
+                            (gcc, creates libpng10.so.0.1.0.18)
        makefile.so9     =>  Solaris 9 makefile
-                            (gcc, creates libpng10.so.0.1.0.17)
+                            (gcc, creates libpng10.so.0.1.0.18)
        makefile.32sunu  =>  Sun Ultra 32-bit makefile
        makefile.64sunu  =>  Sun Ultra 64-bit makefile
        makefile.sco     =>  For SCO OSr5  ELF and Unixware 7 with Native cc
@@ -249,12 +251,12 @@
 Good luck, and happy coding.
 
 -Glenn Randers-Pehrson (current maintainer)
- Internet: glennrp@users.sourceforge.net
+ Internet: glennrp at users.sourceforge.net
 
 -Andreas Eric Dilger (former maintainer, 1996-1997)
- Internet: adilger@enel.ucalgary.ca
+ Internet: adilger at enel.ucalgary.ca
  Web: http://www-mddsp.enel.ucalgary.ca/People/adilger/
 
 -Guy Eric Schalnat (original author and former maintainer, 1995-1996)
  (formerly of Group 42, Inc)
- Internet: gschal@infinet.com
+ Internet: gschal at infinet.com
diff --git a/Y2KINFO b/Y2KINFO
index 40338b0..5bbecc1 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,13 +1,13 @@
    Y2K compliance in libpng:
    =========================
 
-      September 12, 2004
+      December 3, 2004
 
       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.0.17 are Y2K compliant.  It is my belief that earlier
+      upward through 1.0.18 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
diff --git a/configure b/configure
index a505f46..d723aa1 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
 #!/bin/sh
 echo "
   There is no \"configure\" script in this distribution of
-  libpng-1.0.17.
+  libpng-1.0.18.
 
   Instead, please copy the appropriate makefile for your system from the
   \"scripts\" directory.  Read the INSTALL file for more details.
 
   Update, July 2004: you can get a "configure" based distribution
   from the libpng distribution sites.  Download the file
-  libpng-1.0.17-config.tar.gz
+  libpng-1.0.18-config.tar.gz
 "
 
diff --git a/libpng.3 b/libpng.3
index b8d798c..c4284a2 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "September 12, 2004"
+.TH LIBPNG 3 "December 3, 2004"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.17
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
 .SH SYNOPSIS
 \fI\fB
 
@@ -781,9 +781,9 @@
 .SH LIBPNG.TXT
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.17 - September 12, 2004
+ libpng version 1.0.18 - December 3, 2004
  Updated and distributed by Glenn Randers-Pehrson
- <glennrp@users.sourceforge.net>
+ <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2004 Glenn Randers-Pehrson
  For conditions of distribution and use, see copyright
  notice in png.h.
@@ -1530,9 +1530,10 @@
 is called to insert filler bytes, either before or after each RGB triplet.
 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant
 byte of the color value first, unless png_set_strip_16() is called to
-transform it to regular RGB RGB triplets, or png_set_filler|add alpha()
-is called to insert filler bytes, either before or after each RRGGBB
-triplet.  Similarly, 8-bit or 16-bit grayscale data can be modified with
+transform it to regular RGB RGB triplets, or png_set_filler() or
+png_set_add alpha() is called to insert filler bytes, either before or
+after each RRGGBB triplet.  Similarly, 8-bit or 16-bit grayscale data can
+be modified with
 png_set_filler() or png_set_strip_16().
 
 The following code transforms grayscale images of less than 8 to 8 bits,
@@ -1672,7 +1673,7 @@
 
 The default values approximate those recommended in the Charles
 Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
-Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net
+Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
 
     Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
 
@@ -3534,13 +3535,13 @@
 
 .SH VIII. Y2K Compliance in libpng
 
-September 12, 2004
+December 3, 2004
 
 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.0.17 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.18 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
@@ -3688,6 +3689,11 @@
  1.2.7rc1            13    10207  12.so.0.1.2.7rc1
  1.0.17              10    10017  12.so.0.1.0.17
  1.2.7               13    10207  12.so.0.1.2.7
+ 1.2.8beta1-5        13    10208  12.so.0.1.2.8beta1-5
+ 1.0.18rc1-5         10    10018  12.so.0.1.0.18rc1-5
+ 1.2.8rc1-5          13    10208  12.so.0.1.2.8rc1-5
+ 1.0.18              10    10018  12.so.0.1.0.18
+ 1.2.8               13    10208  12.so.0.1.2.8
 
 Henceforth the source version will match the shared-library minor
 and patch numbers; the shared-library major version number will be
@@ -3735,7 +3741,7 @@
 
 .SH AUTHORS
 This man page: Glenn Randers-Pehrson
-<glennrp@users.sourceforge.net>
+<glennrp at users.sourceforge.net>
 
 The contributing authors would like to thank all those who helped
 with testing, bug fixes, and patience.  This wouldn't have been
@@ -3743,14 +3749,14 @@
 
 Thanks to Frank J. T. Wojcik for helping with the documentation.
 
-Libpng version 1.0.17 - September 12, 2004:
+Libpng version 1.0.18 - December 3, 2004:
 Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
-Currently maintained by Glenn Randers-Pehrson (glennrp@users.sourceforge.net).
+Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
 
 Supported by the PNG development group
 .br
-png-implement@ccrc.wustl.edu (subscription required; write to
-majordomo@ccrc.wustl.edu with "subscribe png-implement" in the message).
+png-implement at ccrc.wustl.edu (subscription required; write to
+majordomo at ccrc.wustl.edu with "subscribe png-implement" in the message).
 
 .SH COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
 
@@ -3761,7 +3767,7 @@
 If you modify libpng you may insert additional notices immediately following
 this sentence.
 
-libpng version 1.2.6, September 12, 2004, is
+libpng version 1.2.6, December 3, 2004, is
 Copyright (c) 2004 Glenn Randers-Pehrson, and is
 distributed according to the same disclaimer and license as libpng-1.2.5
 with the following individual added to the list of Contributing Authors
@@ -3859,8 +3865,8 @@
 certification mark of the Open Source Initiative.
 
 Glenn Randers-Pehrson
-glennrp@users.sourceforge.net
-September 12, 2004
+glennrp at users.sourceforge.net
+December 3, 2004
 
 .\" end of man page
 
diff --git a/libpng.txt b/libpng.txt
index 6029929..52ec0bf 100644
--- a/libpng.txt
+++ b/libpng.txt
@@ -1,8 +1,8 @@
 libpng.txt - A description on how to use and modify libpng
 
- libpng version 1.0.17 - September 12, 2004
+ libpng version 1.0.18 - December 3, 2004
  Updated and distributed by Glenn Randers-Pehrson
- <glennrp@users.sourceforge.net>
+ <glennrp at users.sourceforge.net>
  Copyright (c) 1998-2004 Glenn Randers-Pehrson
  For conditions of distribution and use, see copyright
  notice in png.h.
@@ -749,9 +749,10 @@
 is called to insert filler bytes, either before or after each RGB triplet.
 16-bit RGB data will be returned RRGGBB RRGGBB, with the most significant
 byte of the color value first, unless png_set_strip_16() is called to
-transform it to regular RGB RGB triplets, or png_set_filler|add alpha()
-is called to insert filler bytes, either before or after each RRGGBB
-triplet.  Similarly, 8-bit or 16-bit grayscale data can be modified with
+transform it to regular RGB RGB triplets, or png_set_filler() or
+png_set_add alpha() is called to insert filler bytes, either before or
+after each RRGGBB triplet.  Similarly, 8-bit or 16-bit grayscale data can
+be modified with
 png_set_filler() or png_set_strip_16().
 
 The following code transforms grayscale images of less than 8 to 8 bits,
@@ -891,7 +892,7 @@
 
 The default values approximate those recommended in the Charles
 Poynton's Color FAQ, <http://www.inforamp.net/~poynton/>
-Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net
+Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
 
     Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
 
@@ -2753,13 +2754,13 @@
 
 VIII. Y2K Compliance in libpng
 
-September 12, 2004
+December 3, 2004
 
 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.0.17 are Y2K compliant.  It is my belief that earlier
+upward through 1.0.18 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/libpngpf.3 b/libpngpf.3
index f0eaad4..3249df9 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "September 12, 2004"
+.TH LIBPNGPF 3 "December 3, 2004"
 .SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.17
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.18
 (private functions)
 .SH SYNOPSIS
 \fB\fB#include <png.h>\fP\fP
@@ -827,7 +827,7 @@
 
 \fI\fB
 
-\fB\fBint png_set_text_2 (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_textp \fP\fI\fP\fItext_ptr\fP\fB\fP\fB, int \fI\fInum_text)\fP\fB\fP\fB);\fP\fP
+\fB\fBint png_set_text_2 (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, png_infop \fP\fI\fP\fIinfo_ptr\fP\fB\fP\fB, png_textp \fP\fI\fP\fItext_ptr\fP\fB\fP\fB, int \fI\fInum_text\fP\fB\fP\fB);\fP\fP
 
 \fI\fB
 
@@ -939,7 +939,7 @@
 
 \fI\fB
 
-\fB\fBvoid png_write_iTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, int \fP\fI\fP\fIcompression\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charp \fP\fI\fP\fIlang\fP\fB\fP\fB, png_charp \fP\fI\fP\fItranslated_key\fP\fB\fP\fB, png_charp \fI\fItext)\fP\fB\fP\fB);\fP\fP
+\fB\fBvoid png_write_iTXt (png_structp \fP\fI\fP\fIpng_ptr\fP\fB\fP\fB, int \fP\fI\fP\fIcompression\fP\fB\fP\fB, png_charp \fP\fI\fP\fIkey\fP\fB\fP\fB, png_charp \fP\fI\fP\fIlang\fP\fB\fP\fB, png_charp \fP\fI\fP\fItranslated_key\fP\fB\fP\fB, png_charp \fI\fItext\fP\fB\fP\fB);\fP\fP
 
 \fI\fB
 
diff --git a/png.5 b/png.5
index 1cc5ef4..db7c834 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "September 12, 2004"
+.TH PNG 5 "December 3, 2004"
 .SH NAME
 png \- Portable Network Graphics (PNG) format
 .SH DESCRIPTION
diff --git a/png.c b/png.c
index 3a9cae3..62aef8a 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
 
 /* png.c - location for general purpose libpng functions
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -13,7 +13,7 @@
 #include "png.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_17 Your_png_h_is_not_version_1_0_17;
+typedef version_1_0_18 Your_png_h_is_not_version_1_0_18;
 
 /* Version information for C files.  This had better match the version
  * string defined in png.h.  */
@@ -80,7 +80,7 @@
 const int FARDATA png_pass_dsp_mask[]
    = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
 
-#endif
+#endif /* PNG_USE_GLOBAL_ARRAYS */
 
 /* 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
@@ -279,6 +279,7 @@
  * and applications using it are urged to use png_create_info_struct()
  * instead.
  */
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
 #undef png_info_init
 void PNGAPI
 png_info_init(png_infop info_ptr)
@@ -286,6 +287,7 @@
    /* We only come here via pre-1.0.12-compiled applications */
    png_info_init_3(&info_ptr, 0);
 }
+#endif
 
 void PNGAPI
 png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
@@ -678,7 +680,7 @@
 png_get_copyright(png_structp png_ptr)
 {
    if (&png_ptr != NULL)  /* silence compiler warning about unused png_ptr */
-   return ((png_charp) "\n libpng version 1.0.17 - September 12, 2004\n\
+   return ((png_charp) "\n libpng version 1.0.18 - December 3, 2004\n\
    Copyright (c) 1998-2004 Glenn Randers-Pehrson\n\
    Copyright (c) 1996-1997 Andreas Dilger\n\
    Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.\n");
diff --git a/png.h b/png.h
index 322aef6..f29faa6 100644
--- a/png.h
+++ b/png.h
@@ -1,6 +1,6 @@
 /* png.h - header file for PNG reference library
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * Copyright (c) 1998-2004 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.)
@@ -8,7 +8,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.0.17 - September 12, 2004: Glenn
+ *  libpng versions 0.97, January 1998, through 1.0.18 - December 3, 2004: Glenn
  *  See also "Contributing Authors", below.
  *
  * Note about libpng version numbers:
@@ -106,6 +106,11 @@
  *    1.2.7rc1                13    10207  12.so.0.1.2.7rc1
  *    1.0.17                  10    10017  12.so.0.1.0.17
  *    1.2.7                   13    10207  12.so.0.1.2.7
+ *    1.2.8beta1-5            13    10208  12.so.0.1.2.8beta1-5
+ *    1.0.18rc1-5             10    10018  12.so.0.1.0.18rc1-5
+ *    1.2.8rc1-5              13    10208  12.so.0.1.2.8rc1-5
+ *    1.0.18                  10    10018  12.so.0.1.0.18
+ *    1.2.8                   13    10208  12.so.0.1.2.8
  *
  *    Henceforth the source version will match the shared-library major
  *    and minor numbers; the shared-library major version number will be
@@ -135,7 +140,7 @@
  * If you modify libpng you may insert additional notices immediately following
  * this sentence.
  *
- * libpng versions 1.2.6, August 15, 2004, through 1.0.17, September 12, 2004, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.0.18, December 3, 2004, are
  * Copyright (c) 2004 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:
@@ -247,13 +252,13 @@
  * Y2K compliance in libpng:
  * =========================
  *
- *    September 12, 2004
+ *    December 3, 2004
  *
  *    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.0.17 are Y2K compliant.  It is my belief that earlier
+ *    upward through 1.0.18 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
@@ -309,45 +314,81 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.0.17"
+#define PNG_LIBPNG_VER_STRING "1.0.18"
 #define PNG_HEADER_VERSION_STRING \
-   " libpng version 1.0.17 - September 12, 2004 (header)\n"
+   " libpng version 1.0.18 - December 3, 2004 (header)\n"
 
 #define PNG_LIBPNG_VER_SONUM   0
-#define PNG_LIBPNG_VER_DLLNUM  %DLLNUM%
+#define PNG_LIBPNG_VER_DLLNUM  10
 
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MINOR   0
-#define PNG_LIBPNG_VER_RELEASE 17
+#define PNG_LIBPNG_VER_RELEASE 18
 /* This should match the numeric part of the final component of
  * PNG_LIBPNG_VER_STRING, omitting any leading zero: */
 
 #define PNG_LIBPNG_VER_BUILD  0
 
+/* Release Status */
 #define PNG_LIBPNG_BUILD_ALPHA    1
 #define PNG_LIBPNG_BUILD_BETA     2
 #define PNG_LIBPNG_BUILD_RC       3
 #define PNG_LIBPNG_BUILD_STABLE   4
-#define PNG_LIBPNG_BUILD_TYPEMASK 7
-#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with STABLE only */
-#define PNG_LIBPNG_BUILD_TYPE 4
+#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7
+  
+/* Release-Specific Flags */
+#define PNG_LIBPNG_BUILD_PATCH    8 /* Can be OR'ed with
+                                       PNG_LIBPNG_BUILD_STABLE only */
+#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with
+                                       PNG_LIBPNG_BUILD_SPECIAL */
+#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
+                                       PNG_LIBPNG_BUILD_PRIVATE */
+
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
 
 /* Careful here.  At one time, Guy wanted to use 082, but that would be octal.
  * We must not include leading zeros.
  * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only
  * 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 10017 /* 1.0.17 */
+#define PNG_LIBPNG_VER 10018 /* 1.0.18 */
 
 #ifndef PNG_VERSION_INFO_ONLY
-
 /* include the compression library's header */
 #include "zlib.h"
+#endif
 
 /* include all user configurable info, including optional assembler routines */
 #include "pngconf.h"
 
+/*
+ * Added at libpng-1.2.8 */
+/* Ref MSDN: Private as priority over Special
+ * VS_FF_PRIVATEBUILD File *was not* built using standard release
+ * procedures. If this value is given, the StringFileInfo block must
+ * contain a PrivateBuild string. 
+ *
+ * VS_FF_SPECIALBUILD File *was* built by the original company using
+ * standard release procedures but is a variation of the standard
+ * file of the same version number. If this value is given, the
+ * StringFileInfo block must contain a SpecialBuild string. 
+ */
+
+#if defined(PNG_USER_PRIVATEBUILD)
+#  define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
+          PNG_LIBPNG_BUILD_PRIVATE
+#else
+#  if defined(PNG_LIBPNG_SPECIALBUILD)
+#    define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE | \
+            PNG_LIBPNG_BUILD_SPECIAL
+#  else
+#    define PNG_LIBPNG_BUILD_TYPE PNG_LIBPNG_BUILD_BASE_TYPE
+#  endif
+#endif
+
+#ifndef PNG_VERSION_INFO_ONLY
+
 /* Inhibit C++ name-mangling for libpng functions but not for system calls. */
 #ifdef __cplusplus
 extern "C" {
@@ -851,8 +892,8 @@
 
 /* Maximum positive integer used in PNG is (2^31)-1 */
 #define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
-#define PNG_UINT_32_MAX (~((png_uint_32)0))
-#define PNG_SIZE_MAX (~((png_size_t)0))
+#define PNG_UINT_32_MAX ((png_uint_32)(-1))
+#define PNG_SIZE_MAX ((png_size_t)(-1))
 /* PNG_MAX_UINT is deprecated; use PNG_UINT_31_MAX instead. */
 #define PNG_MAX_UINT PNG_UINT_31_MAX
 
@@ -1315,7 +1356,7 @@
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef png_structp version_1_0_17;
+typedef png_structp version_1_0_18;
 
 typedef png_struct FAR * FAR * png_structpp;
 
@@ -2581,7 +2622,14 @@
 #define PNG_RGB_TO_GRAY_ERR  0x200000L
 #define PNG_RGB_TO_GRAY_WARN 0x400000L
 #define PNG_RGB_TO_GRAY      0x600000L  /* two bits, RGB_TO_GRAY_ERR|WARN */
+                       /*    0x800000L     Unused */
 #define PNG_ADD_ALPHA       0x1000000L  /* Added to libpng-1.2.7 */
+                       /*   0x2000000L  unused */
+                       /*   0x4000000L  unused */
+                       /*   0x8000000L  unused */
+                       /*  0x10000000L  unused */
+                       /*  0x20000000L  unused */
+                       /*  0x40000000L  unused */
 
 /* flags for png_create_struct */
 #define PNG_STRUCT_PNG   0x0001
@@ -2615,6 +2663,16 @@
 #define PNG_FLAG_STRIP_ERROR_NUMBERS      0x40000L
 #define PNG_FLAG_STRIP_ERROR_TEXT         0x80000L
 #define PNG_FLAG_MALLOC_NULL_MEM_OK       0x100000L
+#define PNG_FLAG_ADD_ALPHA                0x200000L  /* Added to libpng-1.2.8 */
+#define PNG_FLAG_STRIP_ALPHA              0x400000L  /* Added to libpng-1.2.8 */
+                                  /*      0x800000L  unused */
+                                  /*     0x1000000L  unused */
+                                  /*     0x2000000L  unused */
+                                  /*     0x4000000L  unused */
+                                  /*     0x8000000L  unused */
+                                  /*    0x10000000L  unused */
+                                  /*    0x20000000L  unused */
+                                  /*    0x40000000L  unused */
 
 #define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
                                      PNG_FLAG_CRC_ANCILLARY_NOWARN)
diff --git a/pngconf.h b/pngconf.h
index 33154f3..6f7ffe2 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
 
 /* pngconf.h - machine configurable file for libpng
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -19,6 +19,49 @@
 
 #define PNG_1_0_X
 
+/* 
+ * PNG_USER_CONFIG has to be defined on the compiler command line. This
+ * includes the resource compiler for Windows DLL configurations.
+ */
+
+/*
+ * Added at libpng-1.2.8
+ *  
+ * If you create a private DLL you need to define in "pngusr.h" the followings:
+ * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
+ *        the DLL was built>
+ *  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
+ * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
+ *        distinguish your DLL from those of the official release. These
+ *        correspond to the trailing letters that come after the version
+ *        number and must match your private DLL name>
+ *  e.g. // private DLL "libpng13gx.dll"
+ *       #define PNG_USER_DLLFNAME_POSTFIX "gx"
+ * 
+ * The following macros are also at your disposal if you want to complete the 
+ * DLL VERSIONINFO structure.
+ * - PNG_USER_VERSIONINFO_COMMENTS
+ * - PNG_USER_VERSIONINFO_COMPANYNAME
+ * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
+ */
+
+#ifdef __STDC__
+#ifdef SPECIALBUILD
+#  pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
+ are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
+#endif
+
+#ifdef PRIVATEBUILD
+# pragma message("PRIVATEBUILD is deprecated. Use\
+ PNG_USER_PRIVATEBUILD instead.")
+# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
+#endif
+#endif /* __STDC__ */
+
+#ifndef PNG_VERSION_INFO_ONLY
+
+/* End of material added to libpng-1.2.8 */
+
 /* This is the size of the compression buffer, and thus the size of
  * an IDAT chunk.  Make this whatever size you feel is best for your
  * machine.  One of these will be allocated per png_struct.  When this
@@ -1119,6 +1162,9 @@
 /* Pointers to pointers to pointers; i.e., pointer to array */
 typedef char            FAR * FAR * FAR * png_charppp;
 
+#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
+/* SPC -  Is this stuff deprecated? */
+/* It'll be removed as of libpng-1.3.0 - GR-P */
 /* libpng typedefs for types in zlib. If zlib changes
  * or another compression library is used, then change these.
  * Eliminates need to change all the source files.
@@ -1126,6 +1172,7 @@
 typedef charf *         png_zcharp;
 typedef charf * FAR *   png_zcharpp;
 typedef z_stream FAR *  png_zstreamp;
+#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
 
 /*
  * Define PNG_BUILD_DLL if the module being built is a Windows
@@ -1272,6 +1319,17 @@
 #  define PNG_IMPEXP
 #endif
 
+#ifdef PNG_BUILDSYMS
+#  ifndef PNG_EXPORT
+#    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
+#  endif
+#  ifdef PNG_USE_GLOBAL_ARRAYS
+#    ifndef PNG_EXPORT_VAR
+#      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
+#    endif
+#  endif
+#endif
+
 #ifndef PNG_EXPORT
 #  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
 #endif
@@ -1370,5 +1428,7 @@
 #endif /* PNG_INTERNAL */
 #endif /* PNG_READ_SUPPORTED */
 
-#endif /* PNGCONF_H */
+/* Added at libpng-1.2.8 */
+#endif /* PNG_VERSION_INFO_ONLY */
 
+#endif /* PNGCONF_H */
diff --git a/pngerror.c b/pngerror.c
index 2e2a378..336f07d 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
 
 /* pngerror.c - stub functions for i/o and memory allocation
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pnggccrd.c b/pnggccrd.c
index 4cfe070..70fe032 100644
--- a/pnggccrd.c
+++ b/pnggccrd.c
@@ -6,7 +6,7 @@
  *     and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
  *     for Intel's performance analysis of the MMX vs. non-MMX code.
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
@@ -4998,7 +4998,7 @@
       "jz up_end                    \n\t"
 
       "cmpl $8, %%edx               \n\t" // test for less than 8 bytes
-      "jb up_lt8                    \n\t" //  [added by lcreeve@netins.net]
+      "jb up_lt8                    \n\t" //  [added by lcreeve at netins.net]
 
       "addl %%edx, %%ecx            \n\t"
       "andl $0x00000007, %%edx      \n\t" // calc bytes over mult of 8
diff --git a/pngget.c b/pngget.c
index 33dd04e..bfe7713 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
 
 /* pngget.c - retrieval of values from info struct
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -557,9 +557,9 @@
          *interlace_type = info_ptr->interlace_type;
 
       /* check for potential overflow of rowbytes */
-      if (width == 0 || *width > PNG_UINT_31_MAX)
+      if (*width == 0 || *width > PNG_UINT_31_MAX)
         png_error(png_ptr, "Invalid image width");
-      if (height == 0 || *height > PNG_UINT_31_MAX)
+      if (*height == 0 || *height > PNG_UINT_31_MAX)
         png_error(png_ptr, "Invalid image height");
       if (info_ptr->width > (PNG_UINT_32_MAX
                  >> 3)      /* 8-byte RGBA pixels */
diff --git a/pngmem.c b/pngmem.c
index ba50105..474e4e3 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
 
 /* pngmem.c - stub functions for memory allocation
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index 627da75..27a0371 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
 
 /* pngpread.c - read a png file in push mode
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -815,7 +815,7 @@
    png_memcpy_check(png_ptr, png_ptr->prev_row, png_ptr->row_buf,
       png_ptr->rowbytes + 1);
 
-   if (png_ptr->transformations)
+   if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
       png_do_read_transformations(png_ptr);
 
 #if defined(PNG_READ_INTERLACING_SUPPORTED)
diff --git a/pngread.c b/pngread.c
index 69337bd..e876d99 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
 
 /* pngread.c - read a PNG file
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -172,6 +172,7 @@
 /* Initialize PNG structure for reading, and allocate any memory needed.
    This interface is deprecated in favour of the png_create_read_struct(),
    and it will eventually disappear. */
+#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
 #undef png_read_init
 void PNGAPI
 png_read_init(png_structp png_ptr)
@@ -179,6 +180,7 @@
    /* We only come here via pre-1.0.7-compiled applications */
    png_read_init_2(png_ptr, "1.0.6 or earlier", 0, 0);
 }
+#endif
 
 void PNGAPI
 png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
@@ -393,7 +395,7 @@
 #if defined(PNG_READ_zTXt_SUPPORTED)
       PNG_zTXt;
 #endif
-#endif /* PNG_GLOBAL_ARRAYS */
+#endif /* PNG_USE_LOCAL_ARRAYS */
       png_byte chunk_length[4];
       png_uint_32 length;
 
@@ -744,7 +746,8 @@
    }
 #endif
 
-   if (png_ptr->transformations)
+
+   if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
       png_do_read_transformations(png_ptr);
 
 #if defined(PNG_READ_INTERLACING_SUPPORTED)
@@ -803,7 +806,7 @@
  * not called png_set_interlace_handling(), the display_row buffer will
  * be ignored, so pass NULL to it.
  *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.17
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.18
  */
 
 void PNGAPI
@@ -853,7 +856,7 @@
  * only call this function once.  If you desire to have an image for
  * each pass of a interlaced image, use png_read_rows() instead.
  *
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.17
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.18
  */
 void PNGAPI
 png_read_image(png_structp png_ptr, png_bytepp image)
@@ -961,7 +964,7 @@
 #if defined(PNG_READ_zTXt_SUPPORTED)
       PNG_zTXt;
 #endif
-#endif /* PNG_GLOBAL_ARRAYS */
+#endif /* PNG_USE_LOCAL_ARRAYS */
 
       png_read_data(png_ptr, chunk_length, 4);
       length = png_get_uint_31(png_ptr,chunk_length);
diff --git a/pngrio.c b/pngrio.c
index b689410..e19b775 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
 
 /* pngrio.c - functions for data input
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrtran.c b/pngrtran.c
index d6c483f..df659f2 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
 
 /* pngrtran.c - transforms the data in a row for PNG readers
  *
- * libpng version  1.0.17 - September 12, 2004
+ * libpng version  1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -119,7 +119,7 @@
 png_set_strip_alpha(png_structp png_ptr)
 {
    png_debug(1, "in png_set_strip_alpha\n");
-   png_ptr->transformations |= PNG_STRIP_ALPHA;
+   png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
 }
 #endif
 
@@ -1121,7 +1121,7 @@
       info_ptr->channels = 1;
 
 #if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_STRIP_ALPHA)
+   if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)
       info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
 #endif
 
@@ -1209,9 +1209,9 @@
 #endif
 
 #if defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
-   if (png_ptr->transformations & PNG_STRIP_ALPHA)
+   if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)
       png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
-         PNG_FLAG_FILLER_AFTER);
+         PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA));
 #endif
 
 #if defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
@@ -2104,7 +2104,7 @@
 /* reduce RGB files to grayscale, with or without alpha
  * using the equation given in Poynton's ColorFAQ at
  * <http://www.inforamp.net/~poynton/>
- * Copyright (c) 1998-01-04 Charles Poynton poynton@inforamp.net
+ * Copyright (c) 1998-01-04 Charles Poynton poynton at inforamp.net
  *
  *     Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
  *
diff --git a/pngrutil.c b/pngrutil.c
index f22cab6..1297155 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,6 +1,6 @@
 /* pngrutil.c - utilities to read a PNG file
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -3106,7 +3106,7 @@
    if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
       png_error(png_ptr, "This image requires a row greater than 64KB");
 #endif
-   if ((png_uint_32)png_ptr->rowbytes + 1 > PNG_SIZE_MAX)
+   if ((png_uint_32)png_ptr->rowbytes > PNG_SIZE_MAX - 1)
       png_error(png_ptr, "Row has too many bytes to allocate in memory.");
    png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
       png_ptr->rowbytes + 1));
diff --git a/pngset.c b/pngset.c
index b571cdd..1eaa9bd 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
 
 /* pngset.c - storage of image information into info struct
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngtest.c b/pngtest.c
index b705d49..56acce0 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,7 +1,7 @@
 
 /* pngtest.c - a simple test program to test libpng
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -1551,4 +1551,4 @@
 }
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_17 your_png_h_is_not_version_1_0_17;
+typedef version_1_0_18 your_png_h_is_not_version_1_0_18;
diff --git a/pngtrans.c b/pngtrans.c
index 1c6e876..c1b2a82 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)
  *
- * libpng  1.0.17 - September 12, 2004
+ * libpng  1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -392,7 +392,9 @@
       png_uint_32 row_width=row_info->width;
       png_uint_32 i;
 
-      if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
+      if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
+         (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
+         (flags & PNG_FLAG_STRIP_ALPHA))) &&
          row_info->channels == 4)
       {
          if (row_info->bit_depth == 8)
@@ -471,7 +473,9 @@
          }
          row_info->channels = 3;
       }
-      else if (row_info->color_type == PNG_COLOR_TYPE_GRAY &&
+      else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||
+         (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
+         (flags & PNG_FLAG_STRIP_ALPHA))) &&
           row_info->channels == 2)
       {
          if (row_info->bit_depth == 8)
@@ -525,6 +529,8 @@
          }
          row_info->channels = 1;
       }
+      if (flags & PNG_FLAG_STRIP_ALPHA)
+        row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
    }
 }
 #endif
diff --git a/pngvcrd.c b/pngvcrd.c
index d709f1d..11fa9e1 100644
--- a/pngvcrd.c
+++ b/pngvcrd.c
@@ -2,7 +2,7 @@
  *
  * For Intel x86 CPU and Microsoft Visual C++ compiler
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * Copyright (c) 1998, Intel Corporation
@@ -3632,7 +3632,7 @@
       jz dupend
 
 
-      // 2 lines added by lcreeve@netins.net
+      // 2 lines added by lcreeve at netins.net
       // (mail 11 Jul 98 in png-implement list)
       cmp edx, 8 //test for less than 8 bytes
       jb duplt8
diff --git a/pngwio.c b/pngwio.c
index cbb6aae..a0c3c7d 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
 
 /* pngwio.c - functions for data output
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwrite.c b/pngwrite.c
index 1e00dcf..320c1d8 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,7 +1,7 @@
 
 /* pngwrite.c - general routines to write a PNG file
  *
- * libpng 1.0.17 - September 12, 2004
+ * libpng 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwtran.c b/pngwtran.c
index b20a0be..ef3d372 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,7 +1,7 @@
 
 /* pngwtran.c - transforms the data in a row for PNG writers
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwutil.c b/pngwutil.c
index edf972e..984cd22 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
 
 /* pngwutil.c - utilities to write a PNG file
  *
- * libpng version 1.0.17 - September 12, 2004
+ * libpng version 1.0.18 - December 3, 2004
  * For conditions of distribution and use, see copyright notice in png.h
  * Copyright (c) 1998-2004 Glenn Randers-Pehrson
  * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -219,7 +219,7 @@
             png_error(png_ptr, "zlib error");
       }
       /* check to see if we need more room */
-      if (!png_ptr->zstream.avail_out && png_ptr->zstream.avail_in)
+      if (!(png_ptr->zstream.avail_out))
       {
          /* make sure the output array has room */
          if (comp->num_output_ptr >= comp->max_output_ptr)
@@ -357,9 +357,9 @@
       png_write_chunk_data(png_ptr, png_ptr->zbuf,
          png_ptr->zbuf_size - png_ptr->zstream.avail_out);
 
-   /* reset zlib for another zTXt/iTXt or the image data */
+   /* reset zlib for another zTXt/iTXt or image data */
    deflateReset(&png_ptr->zstream);
-
+   png_ptr->zstream.data_type = Z_BINARY;
 }
 #endif
 
@@ -523,6 +523,9 @@
       png_ptr->zlib_mem_level, png_ptr->zlib_strategy);
    png_ptr->zstream.next_out = png_ptr->zbuf;
    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
+   /* libpng is not interested in zstream.data_type */
+   /* set it to a predefined value, to avoid its evaluation inside zlib */
+   png_ptr->zstream.data_type = Z_BINARY;
 
    png_ptr->mode = PNG_HAVE_IHDR;
 }
@@ -1871,6 +1874,7 @@
    }
 
    deflateReset(&png_ptr->zstream);
+   png_ptr->zstream.data_type = Z_BINARY;
 }
 
 #if defined(PNG_WRITE_INTERLACING_SUPPORTED)
@@ -2048,7 +2052,7 @@
  * been specified by the application, and then writes the row out with the
  * chosen filter.
  */
-#define PNG_MAXSUM (~((png_uint_32)0) >> 1)
+#define PNG_MAXSUM (((png_uint_32)(-1)) >> 1)
 #define PNG_HISHIFT 10
 #define PNG_LOMASK ((png_uint_32)0xffffL)
 #define PNG_HIMASK ((png_uint_32)(~PNG_LOMASK >> PNG_HISHIFT))
diff --git a/projects/visualc71/PRJ0041.mak b/projects/visualc71/PRJ0041.mak
new file mode 100644
index 0000000..3a597b0
--- /dev/null
+++ b/projects/visualc71/PRJ0041.mak
@@ -0,0 +1,21 @@
+# Prevent "Cannot find missing dependency..." warnings while compiling
+# pngw32.rc (PRJ0041).
+
+all: $(IntDir)\alloc.h \
+	 $(IntDir)\fp.h \
+	 $(IntDir)\m68881.h \
+	 $(IntDir)\mem.h \
+	 $(IntDir)\pngusr.h \
+	 $(IntDir)\strings.h \
+	 $(IntDir)\unistd.h \
+	 $(IntDir)\unixio.h
+	 
+$(IntDir)\alloc.h \
+$(IntDir)\fp.h \
+$(IntDir)\m68881.h \
+$(IntDir)\mem.h \
+$(IntDir)\pngusr.h \
+$(IntDir)\strings.h \
+$(IntDir)\unistd.h \
+$(IntDir)\unixio.h:
+	@!echo.>$@
diff --git a/projects/visualc71/README.txt b/projects/visualc71/README.txt
new file mode 100644
index 0000000..df16c1a
--- /dev/null
+++ b/projects/visualc71/README.txt
@@ -0,0 +1,57 @@
+Microsoft Developer Studio Project File, Format Version 7.10 for libpng.
+
+Copyright (C) 2004 Simon-Pierre Cadieux.
+For conditions of distribution and use, see copyright notice in png.h
+
+Assumptions:
+* The libpng source files are in ..\..
+* The zlib source files are in ..\..\..\zlib
+* The zlib project file is in . /* Warning: This is until the zlib project
+  files get intergrated into the next zlib release. The final zlib project
+  directory will then be ..\..\..\zlib\projects\visualc71. */
+
+To use:
+
+1) On the main menu, select "File | Open Solution".
+   Open "libpng.sln".
+
+2) Display the Solution Explorer view (Ctrl+Alt+L)
+
+3) Set one of the project as the StartUp project. If you just want to build the
+   binaries set "libpng" as the startup project (Select "libpng" tree view
+   item + Project | Set as StartUp project). If you want to build and test the
+   binaries set it to "pngtest" (Select "pngtest" tree view item +
+   Project | Set as StartUp project)
+
+4) Select "Build | Configuration Manager...".
+   Choose the configuration you wish to build.
+
+5) Select "Build | Clean Solution".
+
+6) Select "Build | Build Solution (Ctrl-Shift-B)"
+
+This project builds the libpng binaries as follows:
+
+* Win32_DLL_Release\libpng10.dll      DLL build
+* Win32_DLL_Debug\libpng10d.dll       DLL build (debug version)
+* Win32_DLL_ASM_Release\libpng10.dll  DLL build using ASM code
+* Win32_DLL_ASM_Debug\libpng10d.dll   DLL build using ASM (debug version)
+* Win32_DLL_VB\libpng10vb.dll         DLL build for Visual Basic, using stdcall
+* Win32_LIB_Release\libpng.lib        static build
+* Win32_LIB_Debug\libpngd.lib         static build (debug version)
+* Win32_LIB_ASM_Release\libpng.lib    static build using ASM code
+* Win32_LIB_ASM_Debug\libpngd.lib     static build using ASM (debug version)
+
+Notes:
+
+If you change anything in the source files, or select different compiler
+settings, please change the DLL name to something different than any of
+the above names. Also, make sure that in your "pngusr.h" you define
+PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the
+instructions provided in "pngconf.h".
+
+All DLLs built by this project use the Microsoft dynamic C runtime library
+MSVCR71.DLL (MSVCR71D.DLL for debug versions).  If you distribute any of the
+above mentioned libraries you may have to include this DLL in your package.
+For a list of files that are redistributable in Visual Studio see
+$(VCINSTALLDIR)\redist.txt.
diff --git a/projects/visualc71/README_zlib.txt b/projects/visualc71/README_zlib.txt
new file mode 100644
index 0000000..ff6a5c7
--- /dev/null
+++ b/projects/visualc71/README_zlib.txt
@@ -0,0 +1,44 @@
+/* WARNING: This file was put in the LibPNG distribution for convenience only.
+            It is expected to be part of the next zlib release under
+            "projects\visualc71\README.txt." */
+
+Microsoft Developer Studio Project File, Format Version 7.10 for zlib.
+
+Copyright (C) 2004 Simon-Pierre Cadieux.
+Copyright (C) 2004 Cosmin Truta.
+For conditions of distribution and use, see copyright notice in zlib.h.
+
+
+To use:
+
+1) On the main menu, select "File | Open Solution".
+   Open "zlib.sln".
+
+2) Display the Solution Explorer view (Ctrl+Alt+L)
+
+3) Set one of the project as the StartUp project. If you just want to build the
+   binaries set "zlib" as the startup project (Select "zlib" tree view item +
+   Project | Set as StartUp project). If you want to build and test the
+   binaries set it to "example" (Select "example" tree view item + Project |
+   Set as StartUp project), If you want to build the minigzip utility set it to
+   "minigzip" (Select "minigzip" tree view item + Project | Set as StartUp
+   project
+
+4) Select "Build | Configuration Manager...".
+   Choose the configuration you wish to build.
+
+5) Select "Build | Clean Solution".
+
+6) Select "Build | Build Solution (Ctrl-Shift-B)"
+
+This project builds the zlib binaries as follows:
+
+* Win32_DLL_Release\zlib1.dll       DLL build
+* Win32_DLL_Debug\zlib1d.dll        DLL build (debug version)
+* Win32_DLL_ASM_Release\zlib1.dll   DLL build using ASM code
+* Win32_DLL_ASM_Debug\zlib1d.dll    DLL build using ASM code (debug version)
+* Win32_LIB_Release\zlib.lib        static build
+* Win32_LIB_Debug\zlibd.lib         static build (debug version)
+* Win32_LIB_ASM_Release\zlib.lib    static build using ASM code
+* Win32_LIB_ASM_Debug\zlibd.lib     static build using ASM code (debug version)
+
diff --git a/projects/visualc71/libpng.sln b/projects/visualc71/libpng.sln
new file mode 100644
index 0000000..d49277e
--- /dev/null
+++ b/projects/visualc71/libpng.sln
@@ -0,0 +1,88 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libpng.vcproj", "{0008960E-E0DD-41A6-8265-00B31DDB4C21}"
+	ProjectSection(ProjectDependencies) = postProject
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0} = {2D4F8105-7D21-454C-9932-B47CAB71A5C0}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pngtest", "pngtest.vcproj", "{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21} = {0008960E-E0DD-41A6-8265-00B31DDB4C21}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcproj", "{2D4F8105-7D21-454C-9932-B47CAB71A5C0}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		DLL ASM Debug = DLL ASM Debug
+		DLL ASM Release = DLL ASM Release
+		DLL Debug = DLL Debug
+		DLL Release = DLL Release
+		DLL VB = DLL VB
+		LIB ASM Debug = LIB ASM Debug
+		LIB ASM Release = LIB ASM Release
+		LIB Debug = LIB Debug
+		LIB Release = LIB Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.ActiveCfg = DLL Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Debug.Build.0 = DLL Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.ActiveCfg = DLL Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL Release.Build.0 = DLL Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.ActiveCfg = DLL VB|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.DLL VB.Build.0 = DLL VB|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.ActiveCfg = LIB Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Debug.Build.0 = LIB Debug|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.ActiveCfg = LIB Release|Win32
+		{0008960E-E0DD-41A6-8265-00B31DDB4C21}.LIB Release.Build.0 = LIB Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.ActiveCfg = DLL Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Debug.Build.0 = DLL Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.ActiveCfg = DLL Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL Release.Build.0 = DLL Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.ActiveCfg = DLL VB|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.DLL VB.Build.0 = DLL VB|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.ActiveCfg = LIB Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Debug.Build.0 = LIB Debug|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.ActiveCfg = LIB Release|Win32
+		{FD1C2F86-9EEF-47BD-95A4-530917E17FDA}.LIB Release.Build.0 = LIB Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.ActiveCfg = DLL ASM Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Debug.Build.0 = DLL ASM Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.ActiveCfg = DLL ASM Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL ASM Release.Build.0 = DLL ASM Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.ActiveCfg = DLL Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Debug.Build.0 = DLL Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.ActiveCfg = DLL Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL Release.Build.0 = DLL Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.ActiveCfg = DLL Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.DLL VB.Build.0 = DLL Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.ActiveCfg = LIB ASM Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Debug.Build.0 = LIB ASM Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.ActiveCfg = LIB ASM Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB ASM Release.Build.0 = LIB ASM Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.ActiveCfg = LIB Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Debug.Build.0 = LIB Debug|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.ActiveCfg = LIB Release|Win32
+		{2D4F8105-7D21-454C-9932-B47CAB71A5C0}.LIB Release.Build.0 = LIB Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/projects/visualc71/libpng.vcproj b/projects/visualc71/libpng.vcproj
new file mode 100644
index 0000000..31684ef
--- /dev/null
+++ b/projects/visualc71/libpng.vcproj
@@ -0,0 +1,735 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="libpng"
+	RootNamespace="libpng">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="DLL Release|Win32"
+			OutputDirectory=".\Win32_DLL_Release"
+			IntermediateDirectory=".\Win32_DLL_Release"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libpng10.dll"
+				LinkIncremental="1"
+				ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL Debug|Win32"
+			OutputDirectory=".\Win32_DLL_Debug"
+			IntermediateDirectory=".\Win32_DLL_Debug"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_BUILD_DLL;ZLIB_DLL"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libpng10d.dll"
+				ModuleDefinitionFile="..\..\scripts\pngw32.def"
+				GenerateDebugInformation="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1"
+				Culture="1033"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Release|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Release"
+			IntermediateDirectory=".\Win32_DLL_ASM_Release"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libpng10.dll"
+				LinkIncremental="1"
+				ModuleDefinitionFile="..\..\scripts\pngw32.def"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Debug|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Debug"
+			IntermediateDirectory=".\Win32_DLL_ASM_Debug"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_BUILD_DLL;ZLIB_DLL;PNG_LIBPNG_SPECIALBUILD"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libpng10d.dll"
+				ModuleDefinitionFile="..\..\scripts\pngw32.def"
+				GenerateDebugInformation="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				AdditionalOptions="/d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;Use MMX instructions&quot;&quot;&quot;&quot;"
+				PreprocessorDefinitions="_DEBUG,PNG_DEBUG=1"
+				Culture="1033"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL VB|Win32"
+			OutputDirectory=".\Win32_DLL_VB"
+			IntermediateDirectory=".\Win32_DLL_VB"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_BUILD_DLL;ZLIB_DLL;PNGAPI=__stdcall;PNG_NO_MODULEDEF;PNG_LIBPNG_SPECIALBUILD"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/libpng10vb.dll"
+				LinkIncremental="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				AdditionalOptions="/d PNG_LIBPNG_DLLFNAME_POSTFIX=&quot;&quot;&quot;&quot;VB&quot;&quot;&quot;&quot; /d PNG_LIBPNG_SPECIALBUILD=&quot;&quot;&quot;&quot;__stdcall calling convention used for exported functions&quot;&quot;&quot;&quot;"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib;$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Release|Win32"
+			OutputDirectory=".\Win32_LIB_Release"
+			IntermediateDirectory=".\Win32_LIB_Release"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libpng.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Debug|Win32"
+			OutputDirectory=".\Win32_LIB_Debug"
+			IntermediateDirectory=".\Win32_LIB_Debug"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..;..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libpngd.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Release|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Release"
+			IntermediateDirectory=".\Win32_LIB_ASM_Release"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..,..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libpng.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Debug|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Debug"
+			IntermediateDirectory=".\Win32_LIB_ASM_Debug"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..,..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;PNG_DEBUG=1;PNG_USE_PNGVCRD;PNG_LIBPNG_SPECIALBUILD"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="3"
+				PrecompiledHeaderThrough="png.h"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)/libpngd.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\..\png.c">
+				<FileConfiguration
+					Name="DLL Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL VB|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\pngerror.c">
+				<FileConfiguration
+					Name="DLL Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL VB|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\pngget.c">
+			</File>
+			<File
+				RelativePath="..\..\pngmem.c">
+			</File>
+			<File
+				RelativePath="..\..\pngpread.c">
+			</File>
+			<File
+				RelativePath="..\..\pngread.c">
+			</File>
+			<File
+				RelativePath="..\..\pngrio.c">
+			</File>
+			<File
+				RelativePath="..\..\pngrtran.c">
+			</File>
+			<File
+				RelativePath="..\..\pngrutil.c">
+			</File>
+			<File
+				RelativePath="..\..\pngset.c">
+			</File>
+			<File
+				RelativePath="..\..\pngtrans.c">
+			</File>
+			<File
+				RelativePath="..\..\pngvcrd.c">
+				<FileConfiguration
+					Name="DLL Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL VB|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\scripts\pngw32.def">
+				<FileConfiguration
+					Name="DLL VB|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\pngwio.c">
+			</File>
+			<File
+				RelativePath="..\..\pngwrite.c">
+			</File>
+			<File
+				RelativePath="..\..\pngwtran.c">
+			</File>
+			<File
+				RelativePath="..\..\pngwutil.c">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\png.h">
+			</File>
+			<File
+				RelativePath="..\..\pngconf.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+			<File
+				RelativePath="..\..\scripts\pngw32.rc">
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\PRJ0041.mak">
+			<FileConfiguration
+				Name="DLL Release|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
+					CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
+					Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="DLL Debug|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
+					CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
+					Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="DLL ASM Release|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
+					CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
+					Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="DLL ASM Debug|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
+					CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
+					Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="DLL VB|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Create dummy include files to prevent &quot;Cannot find missing dependency...&quot; warnings."
+					CommandLine="nmake -f PRJ0041.mak IntDir=$(IntDir)"
+					Outputs="$(IntDir)\alloc.h;$(IntDir)\fp.h;$(IntDir)\m68881.h;$(IntDir)\mem.h;$(IntDir)\pngusr.h;$(IntDir)\strings.h;$(IntDir)\unistd.h;$(IntDir)\unixio.h"/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="README.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/projects/visualc71/pngtest.vcproj b/projects/visualc71/pngtest.vcproj
new file mode 100644
index 0000000..9911197
--- /dev/null
+++ b/projects/visualc71/pngtest.vcproj
@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="pngtest"
+	RootNamespace="pngtest">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="DLL Release|Win32"
+			OutputDirectory=".\Win32_DLL_Release\Test"
+			IntermediateDirectory=".\Win32_DLL_Release\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				LinkIncremental="1"
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL Debug|Win32"
+			OutputDirectory=".\Win32_DLL_Debug\Test"
+			IntermediateDirectory=".\Win32_DLL_Debug\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Release|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Release\Test"
+			IntermediateDirectory=".\Win32_DLL_ASM_Release\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				LinkIncremental="1"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Debug|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Debug\Test"
+			IntermediateDirectory=".\Win32_DLL_ASM_Debug\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL VB|Win32"
+			OutputDirectory=".\Win32_DLL_VB\Test"
+			IntermediateDirectory=".\Win32_DLL_VB\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_DLL;PNG_NO_STDIO;PNG_NO_GLOBAL_ARRAYS;PNGAPI=__stdcall"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="2"
+				CallingConvention="2"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\..\Win32_DLL_Release\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				LinkIncremental="1"
+				IgnoreDefaultLibraryNames="$(IntDir)\libpng10vb.lib"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Release|Win32"
+			OutputDirectory=".\Win32_LIB_Release\Test"
+			IntermediateDirectory=".\Win32_LIB_Release\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				LinkIncremental="1"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Debug|Win32"
+			OutputDirectory=".\Win32_LIB_Debug\Test"
+			IntermediateDirectory=".\Win32_LIB_Debug\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Release|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Release\Test"
+			IntermediateDirectory=".\Win32_LIB_ASM_Release\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;PNG_NO_GLOBAL_ARRAYS"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				LinkIncremental="1"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Debug|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Debug\Test"
+			IntermediateDirectory=".\Win32_LIB_ASM_Debug\Test"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;PNG_NO_GLOBAL_ARRAYS"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"
+				Description="Testing..."
+				CommandLine="set path=$(OutDir)\..;$(OutDir)\..\ZLib
+$(TargetPath) ..\..\pngtest.png $(IntDir)\pngout.png"
+				Outputs="$(IntDir)\pngout.png"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/pngtest.exe"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\..\pngtest.c">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/projects/visualc71/zlib.vcproj b/projects/visualc71/zlib.vcproj
new file mode 100644
index 0000000..5574ae3
--- /dev/null
+++ b/projects/visualc71/zlib.vcproj
@@ -0,0 +1,670 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="zlib">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="DLL Release|Win32"
+			OutputDirectory=".\Win32_DLL_Release\ZLib"
+			IntermediateDirectory=".\Win32_DLL_Release\ZLib"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlib1.dll"
+				LinkIncremental="1"
+				ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL Debug|Win32"
+			OutputDirectory=".\Win32_DLL_Debug\ZLib"
+			IntermediateDirectory=".\Win32_DLL_Debug\ZLib"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlib1d.dll"
+				ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"
+				GenerateDebugInformation="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Release|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Release\ZLib"
+			IntermediateDirectory=".\Win32_DLL_ASM_Release\ZLib"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlib1.dll"
+				LinkIncremental="1"
+				ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="DLL ASM Debug|Win32"
+			OutputDirectory=".\Win32_DLL_ASM_Debug\ZLib"
+			IntermediateDirectory=".\Win32_DLL_ASM_Debug\ZLib"
+			ConfigurationType="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\zlib1d.dll"
+				ModuleDefinitionFile="..\..\..\zlib\win32\zlib.def"
+				GenerateDebugInformation="TRUE"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Release|Win32"
+			OutputDirectory=".\Win32_LIB_Release\ZLib"
+			IntermediateDirectory=".\Win32_LIB_Release\ZLib"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)\zlib.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB Debug|Win32"
+			OutputDirectory=".\Win32_LIB_Debug\ZLib"
+			IntermediateDirectory=".\Win32_LIB_Debug\ZLib"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)\zlibd.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Release|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Release\ZLib"
+			IntermediateDirectory=".\Win32_LIB_ASM_Release\ZLib"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;NDEBUG;ASMV;ASMINF"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				WarningLevel="3"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)\zlib.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="LIB ASM Debug|Win32"
+			OutputDirectory=".\Win32_LIB_ASM_Debug\ZLib"
+			IntermediateDirectory=".\Win32_LIB_ASM_Debug\ZLib"
+			ConfigurationType="4">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\zlib"
+				PreprocessorDefinitions="WIN32;_DEBUG;ASMV;ASMINF"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+				CompileAs="1"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="$(OutDir)\zlibd.lib"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\..\..\zlib\adler32.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\compress.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\crc32.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\deflate.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\gzio.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\infback.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inffast.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inflate.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inftrees.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\trees.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\uncompr.c">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\win32\zlib.def">
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\zutil.c">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\..\zlib\crc32.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\deflate.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inffast.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inffixed.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inflate.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\inftrees.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\trees.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\zconf.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\zlib.h">
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\zutil.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+			<File
+				RelativePath="..\..\..\zlib\win32\zlib1.rc">
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCResourceCompilerTool"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Assembler Files (Unsupported)"
+			Filter="asm;obj;c;cpp;cxx;h;hpp;hxx">
+			<File
+				RelativePath="..\..\..\zlib\contrib\masmx86\gvmat32.asm">
+				<FileConfiguration
+					Name="DLL Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Debug|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\contrib\masmx86\gvmat32c.c">
+				<FileConfiguration
+					Name="DLL Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\.."/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\.."/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCLCompilerTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\.."/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories="..\.."/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\..\zlib\contrib\masmx86\inffas32.asm">
+				<FileConfiguration
+					Name="DLL Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="DLL ASM Debug|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Release|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB Debug|Win32"
+					ExcludedFromBuild="TRUE">
+					<Tool
+						Name="VCCustomBuildTool"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Release|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="LIB ASM Debug|Win32">
+					<Tool
+						Name="VCCustomBuildTool"
+						Description="Assembling..."
+						CommandLine="ml /nologo /c /Cx /coff /Zi /Fo&quot;$(IntDir)\$(InputName).obj&quot; &quot;$(InputPath)&quot;
+"
+						Outputs="$(IntDir)\$(InputName).obj"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<File
+			RelativePath="README.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/scripts/libpng-config-head.in b/scripts/libpng-config-head.in
index afca9a9..326cbda 100755
--- a/scripts/libpng-config-head.in
+++ b/scripts/libpng-config-head.in
@@ -8,7 +8,7 @@
 
 # Modeled after libxml-config.
 
-version=1.0.17
+version=1.0.18
 prefix=""
 libdir=""
 libs=""
diff --git a/scripts/libpng.pc.in b/scripts/libpng.pc.in
index f28ad66..41596a0 100644
--- a/scripts/libpng.pc.in
+++ b/scripts/libpng.pc.in
@@ -6,6 +6,6 @@
 
 Name: libpng10
 Description: Loads and saves PNG files
-Version: 1.0.17
+Version: 1.0.18
 Libs: -L${libdir} -lpng10 -lz -lm
 Cflags: -I${includedir}/libpng10
diff --git a/scripts/makefile.32sunu b/scripts/makefile.32sunu
index 2b5e930..47bfecf 100644
--- a/scripts/makefile.32sunu
+++ b/scripts/makefile.32sunu
@@ -33,7 +33,7 @@
 
 LIBNAME=libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.64sunu b/scripts/makefile.64sunu
index 2ce8a80..6a68086 100644
--- a/scripts/makefile.64sunu
+++ b/scripts/makefile.64sunu
@@ -33,7 +33,7 @@
 
 LIBNAME=libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 INCPATH=$(prefix)/include
diff --git a/scripts/makefile.aix b/scripts/makefile.aix
index f1f32c0..21ca5aa 100644
--- a/scripts/makefile.aix
+++ b/scripts/makefile.aix
@@ -18,7 +18,7 @@
 
 LIBNAME=libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 prefix=/usr/local
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index e49d1e5..8ba7d1e 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -12,7 +12,7 @@
 ZLIBINC=/usr/local/include
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 ALIGN=
diff --git a/scripts/makefile.cygwin b/scripts/makefile.cygwin
index 1646d35..9965ce3 100644
--- a/scripts/makefile.cygwin
+++ b/scripts/makefile.cygwin
@@ -79,7 +79,7 @@
 LIBNAME = libpng10
 PNGMAJ = 0
 CYGDLL = 12
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 SHAREDLIB=cygpng$(CYGDLL).dll
diff --git a/scripts/makefile.darwin b/scripts/makefile.darwin
index 1ae6d03..c9dd8c0 100644
--- a/scripts/makefile.darwin
+++ b/scripts/makefile.darwin
@@ -23,7 +23,7 @@
 RANLIB=ranlib
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 8f736d7..adb194b 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -32,7 +32,7 @@
 ZLIBINC=../zlib
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.elf b/scripts/makefile.elf
new file mode 100644
index 0000000..2ba3968
--- /dev/null
+++ b/scripts/makefile.elf
@@ -0,0 +1,249 @@
+# makefile for libpng.a and libpng10.so on Linux ELF with gcc
+# Copyright (C) 1998, 1999, 2002 Greg Roelofs and Glenn Randers-Pehrson
+# Copyright (C) 1996, 1997 Andreas Dilger
+# For conditions of distribution and use, see copyright notice in png.h
+
+LIBNAME = libpng10
+PNGMAJ = 0
+PNGMIN = 1.0.18
+PNGVER = $(PNGMAJ).$(PNGMIN)
+
+CC=gcc
+
+# where "make install" puts libpng10.a, libpng10.so*,
+# libpng10/png.h and libpng10/pngconf.h
+# Prefix must be a full pathname.
+prefix=/usr/local
+
+# Where the zlib library and include files are located.
+#ZLIBLIB=/usr/local/lib
+#ZLIBINC=/usr/local/include
+ZLIBLIB=../zlib
+ZLIBINC=../zlib
+
+ALIGN=
+# for i386:
+#ALIGN=-malign-loops=2 -malign-functions=2
+
+WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
+	-Wmissing-declarations -Wtraditional -Wcast-align \
+	-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
+
+# for pgcc version 2.95.1, -O3 is buggy; don't use it.
+
+CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops \
+	$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
+
+LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng10 -lz -lm
+LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
+
+RANLIB=ranlib
+#RANLIB=echo
+
+INCPATH=$(prefix)/include
+LIBPATH=$(prefix)/lib
+MANPATH=$(prefix)/man
+BINPATH=$(prefix)/bin
+
+# override DESTDIR= on the make install command line to easily support
+# installing into a temporary location.  Example:
+#
+#    make install DESTDIR=/tmp/build/libpng
+#
+# If you're going to install into a temporary location
+# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
+# you execute make install.
+DESTDIR=
+
+DB=$(DESTDIR)$(BINPATH)
+DI=$(DESTDIR)$(INCPATH)
+DL=$(DESTDIR)$(LIBPATH)
+DM=$(DESTDIR)$(MANPATH)
+
+OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
+	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
+	pngwtran.o pngmem.o pngerror.o pngpread.o
+
+OBJSDLL = $(OBJS:.o=.pic.o)
+
+.SUFFIXES:      .c .o .pic.o
+
+.c.pic.o:
+	$(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+
+all: libpng.a $(LIBNAME).so pngtest pngtest-static libpng.pc libpng-config
+
+libpng.a: $(OBJS)
+	ar rc $@ $(OBJS)
+	$(RANLIB) $@
+
+libpng.pc:
+	cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
+
+libpng.syms: png.h pngconf.h
+	$(CC) $(CFLAGS) -E -DPNG_BUILDSYMS png.h |\
+	awk -F '[\t [\]();]' 'BEGIN{print "{global:"}\
+	{ for (i=1;i+2<=NF;++i)\
+		if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
+			print $$(i+1) ";";\
+	for (i=1;i+1<=NF;++i)\
+		if ($$(i)=="PNG_DATA_EXPORT")\
+			print $$(i+1) ";";}\
+	END{print "local: *; };"}' >$@.new
+	rm -f $@
+	mv $@.new $@
+
+libpng-config:
+	( cat scripts/libpng-config-head.in; \
+	echo prefix=\"$(prefix)\"; \
+	echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
+	echo L_opts=\"-L$(LIBPATH)\"; \
+	echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
+	echo libs=\"-lpng10 -lz -lm\"; \
+	cat scripts/libpng-config-body.in ) > libpng-config
+	chmod +x libpng-config
+
+$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
+
+$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
+
+$(LIBNAME).so.$(PNGVER): $(OBJSDLL) libpng.syms
+	$(CC) -shared -Wl,-soname,$(LIBNAME).so.$(PNGMAJ) \
+	-Wl,-version-script,libpng.syms \
+	-o $(LIBNAME).so.$(PNGVER) \
+	$(OBJSDLL)
+
+libpng.so.2.$(PNGMIN): $(OBJSDLL) libpng.syms
+	$(CC) -shared -Wl,-soname,libpng.so.2 \
+	-Wl,-version-script,libpng.syms \
+	-o libpng.so.2.$(PNGMIN) \
+	$(OBJSDLL)
+
+pngtest: pngtest.o $(LIBNAME).so
+	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
+
+pngtest-static: pngtest.o libpng.a
+	$(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
+
+test: pngtest pngtest-static
+	@echo ""
+	@echo "   Running pngtest dynamically linked with $(LIBNAME).so:"
+	@echo ""
+	./pngtest
+	@echo ""
+	@echo "   Running pngtest statically linked with libpng.a:"
+	@echo ""
+	./pngtest-static
+
+install-headers: png.h pngconf.h
+	-@if [ ! -d $(DI) ]; then mkdir $(DI); fi
+	-@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
+	cp png.h pngconf.h $(DI)/$(LIBNAME)
+	chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
+	-@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
+	-@/bin/rm -f $(DI)/libpng
+	(cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
+
+install-static: install-headers libpng.a
+	-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+	cp libpng.a $(DL)/$(LIBNAME).a
+	chmod 644 $(DL)/$(LIBNAME).a
+	-@/bin/rm -f $(DL)/libpng.a
+	(cd $(DL); ln -sf $(LIBNAME).a libpng.a)
+
+install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
+	libpng.so.2.$(PNGMIN)
+	-@if [ ! -d $(DL) ]; then mkdir $(DL); fi
+	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
+	-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)
+	-@/bin/rm -f $(DL)/libpng.so
+	-@/bin/rm -f $(DL)/libpng.so.2
+	-@/bin/rm -f $(DL)/libpng.so.2.$(PNGMIN)*
+	cp $(LIBNAME).so.$(PNGVER) $(DL)
+	cp libpng.so.2.$(PNGMIN) $(DL)
+	chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
+	chmod 755 $(DL)/libpng.so.2.$(PNGMIN)
+	(cd $(DL); \
+	ln -sf libpng.so.2.$(PNGMIN) libpng.so.2; \
+	ln -sf libpng.so.2 libpng.so; \
+	ln -sf $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
+	ln -sf $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
+	-@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
+	-@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
+	-@/bin/rm -f $(DL)/pkgconfig/libpng.pc
+	cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
+	chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
+	(cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
+
+install-man: libpng.3 libpngpf.3 png.5
+	-@if [ ! -d $(DM) ]; then mkdir $(DM); fi
+	-@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
+	-@/bin/rm -f $(DM)/man3/libpng.3
+	-@/bin/rm -f $(DM)/man3/libpngpf.3
+	cp libpng.3 $(DM)/man3
+	cp libpngpf.3 $(DM)/man3
+	-@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
+	-@/bin/rm -f $(DM)/man5/png.5
+	cp png.5 $(DM)/man5
+
+install-config: libpng-config
+	-@if [ ! -d $(DB) ]; then mkdir $(DB); fi
+	-@/bin/rm -f $(DB)/libpng-config
+	-@/bin/rm -f $(DB)/$(LIBNAME)-config
+	cp libpng-config $(DB)/$(LIBNAME)-config
+	chmod 755 $(DB)/$(LIBNAME)-config
+	(cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
+
+install: install-static install-shared install-man install-config
+
+# If you installed in $(DESTDIR), test-installed won't work until you
+# move the library to its final location.  Use test-dd to test it
+# before then.
+
+test-dd:
+	echo
+	echo Testing installed dynamic shared library in $(DL).
+	$(CC) -I$(DI) -I$(ZLIBINC) \
+	   `$(BINPATH)/libpng10-config --cflags` pngtest.c \
+	   -L$(DL) -L$(ZLIBLIB) -W1, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
+	   -o pngtestd `$(BINPATH)/libpng10-config --ldflags`
+	./pngtestd pngtest.png
+
+test-installed:
+	$(CC) -I$(ZLIBINC) \
+	   `$(BINPATH)/libpng10-config --cflags` pngtest.c \
+	   -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
+	   -o pngtesti `$(BINPATH)/libpng10-config --ldflags`
+	./pngtesti pngtest.png
+
+clean:
+	/bin/rm -f *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
+	$(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
+	libpng.so.2.$(PNGMIN) \
+	libpng.pc
+
+DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
+writelock:
+	chmod a-w *.[ch35] $(DOCS) scripts/*
+
+# DO NOT DELETE THIS LINE -- make depend depends on it.
+
+png.o png.pic.o: png.h pngconf.h
+pngerror.o pngerror.pic.o: png.h pngconf.h
+pngrio.o pngrio.pic.o: png.h pngconf.h
+pngwio.o pngwio.pic.o: png.h pngconf.h
+pngmem.o pngmem.pic.o: png.h pngconf.h
+pngset.o pngset.pic.o: png.h pngconf.h
+pngget.o pngget.pic.o: png.h pngconf.h
+pngread.o pngread.pic.o: png.h pngconf.h
+pngrtran.o pngrtran.pic.o: png.h pngconf.h
+pngrutil.o pngrutil.pic.o: png.h pngconf.h
+pngtrans.o pngtrans.pic.o: png.h pngconf.h
+pngwrite.o pngwrite.pic.o: png.h pngconf.h
+pngwtran.o pngwtran.pic.o: png.h pngconf.h
+pngwutil.o pngwutil.pic.o: png.h pngconf.h
+pngpread.o pngpread.pic.o: png.h pngconf.h
+
+pngtest.o: png.h pngconf.h
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 0a1ad6c..16af12b 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -15,7 +15,7 @@
 
 LIBNAME = libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 CC=gcc
diff --git a/scripts/makefile.hp64 b/scripts/makefile.hp64
index 5dc6e4c..7e6ab93 100644
--- a/scripts/makefile.hp64
+++ b/scripts/makefile.hp64
@@ -27,7 +27,7 @@
 RANLIB=ranlib
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.hpgcc b/scripts/makefile.hpgcc
index 21ea870..8710409 100644
--- a/scripts/makefile.hpgcc
+++ b/scripts/makefile.hpgcc
@@ -41,7 +41,7 @@
 #RANLIB=echo
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.hpux b/scripts/makefile.hpux
index e0a53d4..5d9ad77 100644
--- a/scripts/makefile.hpux
+++ b/scripts/makefile.hpux
@@ -24,7 +24,7 @@
 RANLIB=ranlib
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index e689e71..25713d4 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -5,7 +5,7 @@
 
 LIBNAME = libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 CC=gcc
diff --git a/scripts/makefile.ne12bsd b/scripts/makefile.ne12bsd
index 9a17f02..c9dbd4d 100644
--- a/scripts/makefile.ne12bsd
+++ b/scripts/makefile.ne12bsd
@@ -13,7 +13,7 @@
 
 LIB=	png12
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.0.17
+SHLIB_MINOR=	1.0.18
 SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
 		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
 		pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.netbsd b/scripts/makefile.netbsd
index 0bc126c..1cfc951 100644
--- a/scripts/makefile.netbsd
+++ b/scripts/makefile.netbsd
@@ -13,7 +13,7 @@
 
 LIB=	png
 SHLIB_MAJOR=	3
-SHLIB_MINOR=	1.0.17
+SHLIB_MINOR=	1.0.18
 SRCS=	pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
 		pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
 		pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/scripts/makefile.openbsd b/scripts/makefile.openbsd
index c08e66c..877341c 100644
--- a/scripts/makefile.openbsd
+++ b/scripts/makefile.openbsd
@@ -7,7 +7,7 @@
 MANDIR= ${PREFIX}/man/cat
 
 SHLIB_MAJOR=	0
-SHLIB_MINOR=	1.0.17
+SHLIB_MINOR=	1.0.18
 
 LIB=	png
 SRCS=	png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index 61ace9f..ca0ac4b 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -24,7 +24,7 @@
 RANLIB=echo
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index e6f5fb5..6568435 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -18,7 +18,7 @@
 
 LIBNAME=libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 CC=gcc
 
diff --git a/scripts/makefile.sgi b/scripts/makefile.sgi
index dc3460b..18c1421 100644
--- a/scripts/makefile.sgi
+++ b/scripts/makefile.sgi
@@ -5,7 +5,7 @@
 
 LIBNAME=libpng10
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 
 # Where make install puts libpng.a, libpng10.so, and libpng10/png.h
diff --git a/scripts/makefile.so9 b/scripts/makefile.so9
index d35bb05..d8a71fa 100644
--- a/scripts/makefile.so9
+++ b/scripts/makefile.so9
@@ -34,7 +34,7 @@
 RANLIB=echo
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 01ac64f..e4834d5 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -30,7 +30,7 @@
 RANLIB=echo
 
 PNGMAJ = 0
-PNGMIN = 1.0.17
+PNGMIN = 1.0.18
 PNGVER = $(PNGMAJ).$(PNGMIN)
 LIBNAME = libpng10
 
diff --git a/scripts/pngos2.def b/scripts/pngos2.def
index 0046450..03cf38b 100644
--- a/scripts/pngos2.def
+++ b/scripts/pngos2.def
@@ -2,7 +2,7 @@
 ; PNG.LIB module definition file for OS/2
 ;----------------------------------------
 
-; Version 1.0.17
+; Version 1.0.18
 
 LIBRARY		PNG
 DESCRIPTION	"PNG image compression library for OS/2"
diff --git a/scripts/pngw32.def b/scripts/pngw32.def
index 7420653..2081905 100644
--- a/scripts/pngw32.def
+++ b/scripts/pngw32.def
@@ -3,10 +3,9 @@
 ;------------------------------------------
 
 LIBRARY
-DESCRIPTION "PNG image compression library for Windows"
 
 EXPORTS
-;Version 1.0.17
+;Version 1.0.18
   png_build_grayscale_palette  @1
   png_check_sig        @2
   png_chunk_error      @3
@@ -191,3 +190,37 @@
   png_write_init_3    @176
   png_info_init_3 @177
   png_destroy_struct  @178
+; Added at version 1.2.0
+; For use with PNG_USER_MEM_SUPPORTED
+  png_destroy_struct_2  @179
+  png_create_read_struct_2 @180
+  png_create_write_struct_2 @181
+  png_malloc_default @182
+  png_free_default @183
+; MNG features
+  png_permit_mng_features  @184
+; MMX support
+  png_mmx_support  @185
+  png_get_mmx_flagmask  @186
+  png_get_asm_flagmask  @187
+  png_get_asm_flags  @188
+  png_get_mmx_bitdepth_threshold  @189
+  png_get_mmx_rowbytes_threshold  @190
+  png_set_asm_flags  @191
+  png_init_mmx_flags  @192
+; Strip error numbers
+  png_set_strip_error_numbers @193
+; Added at version 1.2.2
+  png_handle_as_unknown @194
+; Added at version 1.2.2 and deleted from 1.2.3
+; png_zalloc @195
+; png_zfree @196
+; Added at version 1.2.4
+  png_malloc_warn @195
+; Added at version 1.2.6
+  png_malloc_warn @195
+  png_get_user_height_max @196
+  png_get_user_width_max @197
+  png_set_user_limits @198
+; Added at version 1.2.7
+  png_set_add_alpha @199
diff --git a/scripts/pngw32.rc b/scripts/pngw32.rc
index e69d732..02e30e2 100644
--- a/scripts/pngw32.rc
+++ b/scripts/pngw32.rc
@@ -8,57 +8,68 @@
 
 #define PNG_LIBPNG_DLLFNAME "LIBPNG"
 
-#if defined(DLLFNAME_POSTFIX) && !defined(PRIVATEBUILD) && !defined(SPECIALBUILD)
-#  error PRIVATEBUILD or SPECIALBUILD must be defined as a string describing the type of change brought to the standard library
-#endif /* defined(DLLFNAME_POSTFIX)... */
+/* Support deprecated PRIVATEBUILD macro */
+#if defined(PRIVATEBUILD) && !defined(PNG_USER_PRIVATEBUILD)
+#  define PNG_USER_PRIVATEBUILD PRIVATEBUILD
+#endif
 
-#if defined(PNG_USE_PNGVCRD)
-#  if !defined(SPECIALBUILD)
-#    define SPECIALBUILD "Use MMX instructions"
-#  endif /* SPECIALBUILD */
+#if defined(PNG_USER_DLLFNAME_POSTFIX) && !defined(PNG_USER_PRIVATEBUILD)
+#  error "PNG_USER_PRIVATEBUILD must be defined as a string describing the\
+ custom changes made to the library."
+#endif
+
+/* Prioritize PNG_USER_x over PNG_LIBPNG_x */
+#ifdef PNG_USER_DLLFNAME_POSTFIX
+#  undef PNG_LIBPNG_DLLFNAME_POSTFIX
+#  define PNG_LIBPNG_DLLFNAME_POSTFIX PNG_USER_DLLFNAME_POSTFIX
+#endif
+
+#ifdef PNG_USER_VERSIONINFO_COMMENTS
+#  undef PNG_LIBPNG_VERSIONINFO_COMMENTS
+#  define PNG_LIBPNG_VERSIONINFO_COMMENTS PNG_USER_VERSIONINFO_COMMENTS
 #endif
 
 #if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
 #  define VS_DEBUG VS_FF_DEBUG
-#  ifndef DLLFNAME_POSTFIX
-#    define DLLFNAME_POSTFIX "D"
-#  endif /* DLLFNAME_POSTFIX */
-#  ifndef COMMENTS 
-#    define COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
-#  endif /* COMMENTS */
+#  ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+#    define PNG_LIBPNG_DLLFNAME_POSTFIX "D"
+#  endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
+#  ifndef PNG_LIBPNG_VERSIONINFO_COMMENTS
+#    define PNG_LIBPNG_VERSIONINFO_COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
+#  endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
 #else
 #  define VS_DEBUG 0
-#  ifndef DLLFNAME_POSTFIX
-#     define DLLFNAME_POSTFIX
-#  endif /* DLLFNAME_POSTFIX */
+#  ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
+#     define PNG_LIBPNG_DLLFNAME_POSTFIX
+#  endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
 #endif /* defined(DEBUG)... */
 
-#ifdef PRIVATEBUILD
+#ifdef PNG_USER_PRIVATEBUILD
 #  define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
 #else
 #  define VS_PRIVATEBUILD 0
-#endif /* PRIVATEBUILD */
+#endif /* PNG_USER_PRIVATEBUILD */
 
-#ifdef SPECIALBUILD
+#ifdef PNG_LIBPNG_SPECIALBUILD
 #  define VS_SPECIALBUILD VS_FF_SPECIALBUILD
 #else
 #  define VS_SPECIALBUILD 0
-#endif /* SPECIALBUILD */
+#endif /* PNG_LIBPNG_BUILD_SPECIAL */
 
-#if ((PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_TYPEMASK) != \
+#if ((PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_RELEASE_STATUS_MASK) !=\
       PNG_LIBPNG_BUILD_STABLE)
 #  define VS_PRERELEASE VS_FF_PRERELEASE
 #  define VS_PATCHED 0
 #else
 #  define VS_PRERELEASE 0
-#  if (PNG_LIBPNG_BUILD_TYPE & PNG_LIBPNG_BUILD_PATCHED)
+#  if (PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_BUILD_PATCHED)
 #    define VS_PATCHED VS_FF_PATCHED
 #  else
 #    define VS_PATCHED 0
 #  endif
 #endif
 
-VS_VERSION_INFO VERSIONINFO 
+VS_VERSION_INFO VERSIONINFO
 FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
 PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
@@ -70,22 +81,28 @@
   BLOCK "StringFileInfo"
   BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
     BEGIN
-#ifdef COMMENTS
-      VALUE "Comments", COMMENTS "\000"
-#endif /* COMMENTS */
+#ifdef PNG_LIBPNG_VERSIONINFO_COMMENTS
+      VALUE "Comments", PNG_LIBPNG_VERSIONINFO_COMMENTS "\000"
+#endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
+#ifdef PNG_USER_VERSIONINFO_COMPANYNAME
+      VALUE "CompanyName", PNG_USER_VERSIONINFO_COMPANYNAME "\000"
+#endif /* PNG_USER_VERSIONINFO_COMPANYNAME */
       VALUE "FileDescription", "PNG image compression library\000"
       VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
-      VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX " (Windows 32 bit)\000"
+      VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
       VALUE "LegalCopyright", "\251 1998-2004 Glenn Randers-Pehrson et al.\000"
-      VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) DLLFNAME_POSTFIX ".DLL\000"
-#ifdef PRIVATEBUILD
-      VALUE "PrivateBuild", PRIVATEBUILD
-#endif /* PRIVATEBUILD */
+#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
+      VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
+#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
+      VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
+#ifdef PNG_USER_PRIVATEBUILD
+      VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
+#endif /* PNG_USER_PRIVATEBUILD */
       VALUE "ProductName", "LibPNG\000"
       VALUE "ProductVersion", "1\000"
-#ifdef SPECIALBUILD
-      VALUE "SpecialBuild", SPECIALBUILD
-#endif /* SPECIALBUILD */
+#ifdef PNG_LIBPNG_SPECIALBUILD
+      VALUE "SpecialBuild", PNG_LIBPNG_SPECIALBUILD "\000"
+#endif /* PNG_LIBPNG_SPECIALBUILD */
     END
   END
   BLOCK "VarFileInfo"