Compile zlib first (follow these steps).
Next, download the latest libpng (e.g) library and extract it.
Launch VS command prompt: Microsoft Visual Studio 2008 -> Visual Studio Tools -> Visual Studio 2008 Command Prompt
Create a new zlib folder inside it:
$ cd lpng1617
$ mkdir zlibCopy(output from these steps ) zlib.lib, zconf.h and zlib.h to the new zlib folder.
Build:
$ nmake /f scriptsmakefile.vcwin32Output in lpng1617 folder.
libpng.lib
Copy png.h and libpng.lib to your project. Done!