libpng 0.89c for BeBox README (96/07/21) Ported by Jake Hamby (jehamby@lightside.com) -------------------------------------------- This is a port of the latest version of libpng, a library used to read/write PNG images. It is currently used by my port of Ghostscript 4.01, but any program which needs to read/write PNG images could take advantage of it. LibPNG _requires_ zlib to work, the zlib archive is available from the same place where you downloaded libpng. Installation: ------------- Simply run the enclosed setup.sh shell script. It will first check for the presence of zlib (which is REQUIRED), then copy the libpng shared library to /system/lib, along with its .xMAP file (used for debugging programs which use libpng). Finally, it runs the enclosed "pngtest" program which will look like this, if everything has been installed correctly: Testing libpng version 0.89 libpng passes test Uninstallation: --------------- If you decide to uninstall libpng, you only need to delete the files "libpng.so" and "libpng.so.xMAP" from the /system/lib directory. Compiling programs which use libpng: ------------------------------------ To compile programs which use libpng, you will need to copy the enclosed png.h and pngconf.h files to the directory in which that program expects them (usually a libpng subdirectory), or put them in a standard place (I use /boot/local/include) and include that directory in the Makefile (-I/boot/local/include). You will also need to put zlib.h and zconf.h, from the zlib distribution, into the same directory. In the linking phase, if you are building a standard executable, use the "-lpng" flag to link with libpng. Linking with zlib is not necessary, as libpng.so will find zlib itself. Troubleshooting: ---------------- If you receive a "cannot execute binary file" or "Error launching..." message when attempting to run a program which requires libpng, verify that both libpng.so and libz.so are present in /system/lib. If you have any other problems, please e-mail me: jehamby@lightside.com Building from source: --------------------- Building libpng from source code is very simple. Simply download the libpng source code from one of the following locations: ftp://ftp.uu.net/graphics/png/src/libpng-0.89c.tar.gz http://absinthe.lightside.net/~jehamby/Be/src/libpng-0.89c.tar.gz Extract the archive, and copy the enclosed makefile and libpng.exp into the libpng-0.89c directory. Now, copy zlib.h and zconf.h from the zlib archive into a directory called "zlib" at the same level as the libpng directory (in other words, when you are inside libpng-0.89c, you should be able to "more ../zlib/zlib.h"). Run "make test" to compile and test the shared library. "make install" will install the library into /system/lib, and header files into /boot/local/include. See the Makefile for more information. For more information: --------------------- I've included the original readme.txt file for libpng, as well as libpng.txt, which explains how to use the library in great detail. Also, pngchang.txt details changes since earlier versions, and pngtodo.txt lists improvements to be made before the final 1.0 version of libpng. New versions of this, and other BeBox programs are available from my Web page: http://absinthe.lightside.net/~jehamby/Be/ Please send all comments and suggestions about the BeBox versions of libpng and zlib to: jehamby@lightside.com Enjoy!