| pngmeta |
| ======= |
| |
| This small filter program extracts metadata from PNG images and |
| displays them as either HTML, SOIF, RDF/XML or simple fields 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, 1.0.03) |
| * zlib (tested with 1.1.1, 1.1.3) |
| |
| 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 |
| ------------ |
| |
| Use the GNU configuration program: |
| ./configure |
| make |
| |
| This package needs the libpng and zlib libraries and header files and |
| you have several ways to specify this if the above fails. |
| |
| If you have installed these packages in the default places (libs in |
| usual lib path, includes under /usr/include), then they will be |
| automatically found. |
| |
| If you have compiled the packages but they remain in the source dirs, |
| use one of these options to configure: |
| |
| --with-png=DIR DIR is root for libpng distribution |
| --with-zlib=DIR DIR is root for libz distribution |
| |
| Note, this automatically happens the distributions are found in |
| nearby directories with these names: |
| zlib-X.* zlib (subdirectories) or ../zlib |
| libpng-X.* libpng (subdirectories) or ../libpng |
| |
| If the libraries and headers are installed in places that cannot be |
| found by configure, you can specify the individual libraries and |
| include paths with these options: |
| |
| --with-zlib-lib=LIB LIB is path to libz.a |
| --with-png-lib=LIB LIB is path to libpng.a |
| --with-png-includes=DIR DIR is path where PNG header files can be |
| found, defaults to /usr/include |
| --with-zlib-includes=DIR DIR is path where ZLIB header files can be |
| found, defaults to /usr/include |
| |
| |
| |
| |
| OR If all of that fails, use the Makefile.old, 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 -f Makefile.old'. |
| |
| |
| 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 check' 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. |
| |
| |
| Copyright |
| --------- |
| |
| This code was modified from the code for png_read_end() from the |
| libpng library. See pngmeta.c for the full copyright headers - they |
| have to remain in that file to comply with them. |
| |
| The GNU automake/autoconf configuration files and all that libpng and |
| zlib searching stuff was written by me and I give permission for |
| other people to use it to autoconfigure png and zlib in their |
| programs, as long as you acknowledge me. |
| |
| |
| Thanks |
| ------ |
| ... to Rick Rodgers <rodgers@nlm.nih.gov> for the manual page. |
| ... to Dan Brickley <daniel.brickley@bristol.ac.uk> for the RDF/XML output. |
| |
| |
| Dave Beckett |
| D.J.Beckett@ukc.ac.uk |
| http://www.cs.ukc.ac.uk/people/staff/djb1/ |
| 31st January 2000 |
| |