			       pngmeta
			       =======

This small filter program extracts metadata from PNG images and
displays them as either HTML, SOIF or simple keys and values.

This software is distributed under the same copyright as the PNG
Reference Library (libpng), upon which some of this code is based --
see pngmeta.c for details.


Requirements
------------

* An ANSI C compiler -- preferrably gcc
* libpng (tested with 1.0.0)
* zlib   (tested with 1.1.1)

The latter two packages are available from ftp://ftp.uu.net/graphics/png/
andr many other places, see the PNG Home Page for details.


Installation
------------

Edit the ZLIB and LIBPNG variables in the makefile to point to
the zlib and libpng installation directories.  Pick a C compiler
(by default set for gcc) and ranlib and then do a 'make'.


Testing
-------

Three test PNG images are provided:
  ct1n0g04.png ctzn0g04.png
    which contain uncompressed and compressed text chunks respectively.
    These are part of the PNG image test suite written by
    Willem A.J. van Schaik <gwillem@ntuvax.ntu.ac.sg>

  8859.png
    All the printable ISO 8859-1 Latin 1 characters from hex codes
    20 to 7E and A0 to FF provided by Chris Lilley <chris@w3.org>

and these are all checked when 'make test' is run


Usage Examples
--------------

mint% pngmeta goldhill.png 
pngmeta: PNG meta data for goldhill.png:
Title: GOLDHILL: Photo of hill in small European town.
Copyright: Unknown
Modification Time: 23 Apr 1995 01:15:08 +0000

mint% pngmeta -soif ct1n0g04.png 
@FILE { ct1n0g04.png
image-format{3}:	PNG
image-colors{1}:	4
image-width{2}:	32
image-height{2}:	32
image-type{25}:	Grayscale, non-interlaced
Title{8}:	PngSuite
Author{49}:	Willem A.J. van Schaik
(gwillem@ntuvax.ntu.ac.sg)
Copyright{43}:	Copyright Willem van Schaik, Singapore 1995
Description{239}:	A compilation of a set of images created to test the
various color-types of the PNG format. Included are
black&white, color, paletted, with alpha channel, with
transparency formats. All bit-depths allowed according
to the spec are present.
Software{48}:	Created on a NeXTstation color using "pnmtopng".
Disclaimer{9}:	Freeware.
}


See the manual page for more information on the options and usage.


Implementation
--------------

The program contains a new function png_skip_till_end() that takes up
the reading of the PNG data stream after the first IDAT has been
detected.  It then copies through, checking the CRCs of them but not
decompressing or processing them.  Finally, any remaining chunks are
processed in the standard fashion.  This code was modified from the
code for png_read_end() from the libpng library.  See pngmeta.c for
the full copyright details.



Thanks
------
... to Rick Rodgers <rodgers@nlm.nih.gov> for the manual page.



Dave Beckett
D.J.Beckett@ukc.ac.uk
http://www.cs.ukc.ac.uk/people/staff/djb1/
10th March 1998
