PNG_IO is an Ada 95 Portable Network Graphics (PNG) coder/decoder. It is designed to provide Ada 95 programmers with direct access to images and graphics stored in PNG format files.
PNG is an image file format supporting greyscale and colour images with and without alpha channels. It is patent-free and offers good levels of lossless compression. The PNG format is defined by the PNG Specification which is available from the PNG website (home page) and various mirrors.
PNG_IO is not intended to serve as an Ada 95 substitute for libpng, the PNG 'C' library, since it provides only high-level reading and writing of images with minimal user-level control. If what you want to do is simply read or write a PNG image from an Ada 95 program, then PNG_IO may be what you want. If you want to do something fancy like display an image progressively as it is read from a remote location, then PNG_IO will not be suitable as it stands.
PNG_IO consists of just over 4000 lines of Ada 95 code, including blank lines and comments. (The source code files contain a standard header of about 40 lines, which is counted once in this total, even though it occurs in every source code file.) There are just over 1800 semicolons (some people regard this as a better indicator than number of lines of code).
PNG_IO is free software released as source code under the GNU General Public License. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
PNG_IO was written by Steve Sangwine while at The University of Reading, UK. He joined the Department of Electronic Systems Engineering, University of Essex, in January 2001 and will continue to maintain and enhance PNG_IO. The University of Reading has agreed to the public release of PNG_IO under the GNU General Public Licence. Enquiries concerning commercial licensing of the software should be directed to Research and Enterprise Services, The University of Reading, Whiteknights, PO Box 217, Reading RG6 6AH, United Kingdom. WWW: http://www.rdg.ac.uk/RES/
PNG_IO is intended to be operating system and machine independent. It depends on (withs) only standard Ada 95 packages.
In order to compile and use PNG_IO, you will need to have the Zlib (home page) compression and decompression library. All applications using PNG_IO must be linked (statically or dynamically) with Zlib. Zlib is freely available as C source code, and as pre-compiled libraries for some operating systems (e.g. Windows 95/98/NT). PNG_IO requires the Zlib_Ada binding to Zlib which is distributed with Zlib version 1.2.1.
PNG_IO is not dependent on libpng.
At present, the user interface does not support passing of whole images as arrays. Support for this may come in a later release, with a generic package which can be instantiated for the user's image array type. (The user will still have to supply functions to construct and deconstruct composite pixels such as RGB and RGB + alpha and greyscale + alpha.)
PNG_IO is distributed as a single zip or gzip compressed tar file. The versions available here are not the latest. Please see the top of this page for a link to the Sourceforge site where you can find later versions.
|Distribution zip file (includes manual)||png_4_0.zip||142kB|
|User and Reference Manual||png_io_manual.pdf||86kB|
|Distribution zip file (includes manual)||png_3_4.zip||123kB|
|Distribution tar file (includes manual)||png_3_4.tar.gz||99kB|