compile libpng.lib
libpng is the library to give the approach to png read&write.
libpng uses zlib to complete the compress&uncompress job, so the we assume the zlib has installed previously.
1. make sure that the directory zlib and the directory png locating under the same folder.
2. select the right make file in png/scripts to compile, e.g. on window with vs/vc to compile, you should choose makefile.vcwin32(copy it to the folder png) to build with the command "nmake makefile.vcwin32" (you'd better to run it in vs procmd),
then the libpng.lib is generated in folder png.
use the libpng.lib
As libpng need zlib to do the compress stuff, you should reference the libzlib.lib also whenever you use the libpng.lib.
Be aware that, there are different approach to load static lib in vc6.0 and vs2005:
In vc6.0, you just need to add the whole absolute path of the referenced lib to the project setting, e.g. C:/MyLib/lipng.lib;
but in vs2005, you could only set the directory where the necessary lib locates, so you should search the necessary lib in your code before using it, e.g. add the codes :
the same as the reference to libzlib.lib.