mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
1 Commits
v0.0.0
...
pngmeta_1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77b7eb6d63 |
33
Makefile.am
Normal file
33
Makefile.am
Normal file
@@ -0,0 +1,33 @@
|
||||
## -*- makefile -*-
|
||||
##
|
||||
## Process this file with automake to produce Makefile.in
|
||||
##
|
||||
## $Source: /home/cur/djb1/develop/pngmeta/pngmeta/RCS/Makefile.am,v $
|
||||
##
|
||||
## $Id: Makefile.am,v 1.5 2000/01/31 14:15:53 djb1 Exp $
|
||||
##
|
||||
## (C) Copyright 1998, Dave Beckett, University of Kent at Canterbury
|
||||
##
|
||||
|
||||
INCLUDES=-I$(PNG_INCLUDE) -I$(ZLIB_INCLUDE)
|
||||
|
||||
bin_PROGRAMS = pngmeta
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign no-dependencies
|
||||
|
||||
EXTRA_DIST=test1 test2 test3 test4\
|
||||
test1.xpt test2.xpt test3.xpt test4.xpt\
|
||||
8859.png ctzn0g04.png ct1n0g04.png\
|
||||
pngmeta.1 Makefile.old pngmeta.spec
|
||||
|
||||
man_MANS=pngmeta.1
|
||||
|
||||
TESTS=test1 test2 test3 test4
|
||||
|
||||
test-results: pngmeta
|
||||
./pngmeta -quiet ct1n0g04.png > test1.xpt
|
||||
./pngmeta -soif -quiet ctzn0g04.png > test2.xpt
|
||||
./pngmeta -html -quiet 8859.png > test3.xpt
|
||||
./pngmeta -xrdf ct1n0g04.png > test4.xpt
|
||||
|
||||
MAINTAINERCLEANFILES=test1.xpt test2.xpt test3.xpt test4.xpt
|
||||
357
Makefile.in
Normal file
357
Makefile.in
Normal file
@@ -0,0 +1,357 @@
|
||||
# Makefile.in generated automatically by automake 1.2 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy, distribute and modify it.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = .
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
CC = @CC@
|
||||
EXEEXT = @EXEEXT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
PACKAGE = @PACKAGE@
|
||||
PNG_INCLUDE = @PNG_INCLUDE@
|
||||
VERSION = @VERSION@
|
||||
ZLIB_INCLUDE = @ZLIB_INCLUDE@
|
||||
|
||||
INCLUDES=-I$(PNG_INCLUDE) -I$(ZLIB_INCLUDE)
|
||||
|
||||
bin_PROGRAMS = pngmeta
|
||||
|
||||
AUTOMAKE_OPTIONS=foreign no-dependencies
|
||||
|
||||
EXTRA_DIST=test1 test2 test3 test4\
|
||||
test1.xpt test2.xpt test3.xpt test4.xpt\
|
||||
8859.png ctzn0g04.png ct1n0g04.png\
|
||||
pngmeta.1 Makefile.old pngmeta.spec
|
||||
|
||||
man_MANS=pngmeta.1
|
||||
|
||||
TESTS=test1 test2 test3 test4
|
||||
|
||||
MAINTAINERCLEANFILES=test1.xpt test2.xpt test3.xpt test4.xpt
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES =
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir)
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
pngmeta_SOURCES = pngmeta.c
|
||||
pngmeta_OBJECTS = pngmeta.o
|
||||
pngmeta_LDADD = $(LDADD)
|
||||
pngmeta_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
MANS = pngmeta.1
|
||||
|
||||
NROFF = nroff
|
||||
DIST_COMMON = README Makefile.am Makefile.in NEWS aclocal.m4 configure \
|
||||
configure.in install-sh missing mkinstalldirs
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gnutar
|
||||
GZIP = --best
|
||||
SOURCES = pngmeta.c
|
||||
OBJECTS = pngmeta.o
|
||||
|
||||
default: all
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
$(ACLOCAL_M4): configure.in
|
||||
cd $(srcdir) && $(ACLOCAL)
|
||||
|
||||
config.status: $(srcdir)/configure
|
||||
$(SHELL) ./config.status --recheck
|
||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
|
||||
done
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
pngmeta: $(pngmeta_OBJECTS) $(pngmeta_DEPENDENCIES)
|
||||
@rm -f pngmeta
|
||||
$(LINK) $(pngmeta_LDFLAGS) $(pngmeta_OBJECTS) $(pngmeta_LDADD) $(LIBS)
|
||||
install-man: $(MANS)
|
||||
$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(mandir)/man1
|
||||
@sect=1; \
|
||||
inst=`echo "pngmeta" | sed '$(transform)'`.1; \
|
||||
if test -f $(srcdir)/pngmeta.1; then file=$(srcdir)/pngmeta.1; \
|
||||
else file=pngmeta.1; fi; \
|
||||
echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \
|
||||
$(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
|
||||
|
||||
uninstall-man:
|
||||
$(NORMAL_UNINSTALL)
|
||||
inst=`echo "pngmeta" | sed '$(transform)'`.1; \
|
||||
rm -f $(mandir)/man1/$$inst
|
||||
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
rm -rf $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
|
||||
mkdir $(distdir)/=build
|
||||
mkdir $(distdir)/=inst
|
||||
dc_install_base=`cd $(distdir)/=inst && pwd`; \
|
||||
cd $(distdir)/=build \
|
||||
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
|
||||
&& $(MAKE) \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(MAKE) check \
|
||||
&& $(MAKE) install \
|
||||
&& $(MAKE) installcheck \
|
||||
&& $(MAKE) dist
|
||||
rm -rf $(distdir)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
dist: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
rm -rf $(distdir)
|
||||
dist-all: distdir
|
||||
-chmod -R a+r $(distdir)
|
||||
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
|
||||
rm -rf $(distdir)
|
||||
distdir: $(DISTFILES)
|
||||
rm -rf $(distdir)
|
||||
mkdir $(distdir)
|
||||
-chmod 777 $(distdir)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
done
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
for tst in $(TESTS); do \
|
||||
if test -f $$tst; then dir=.; \
|
||||
else dir="$(srcdir)"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
echo "PASS: $$tst"; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
fi; \
|
||||
dashes=`echo "$$banner" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE) check-TESTS
|
||||
installcheck:
|
||||
install-exec: install-binPROGRAMS
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install-data: install-man
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-binPROGRAMS uninstall-man
|
||||
|
||||
all: Makefile $(PROGRAMS) $(MANS)
|
||||
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(bindir) $(mandir)/man1
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-generic
|
||||
|
||||
clean: clean-binPROGRAMS clean-compile clean-tags clean-generic \
|
||||
mostlyclean
|
||||
|
||||
distclean: distclean-binPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-generic clean
|
||||
rm -f config.status
|
||||
|
||||
maintainer-clean: maintainer-clean-binPROGRAMS maintainer-clean-compile \
|
||||
maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f config.status
|
||||
|
||||
.PHONY: default mostlyclean-binPROGRAMS distclean-binPROGRAMS \
|
||||
clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \
|
||||
install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile install-man uninstall-man tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir check-TESTS info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
|
||||
|
||||
test-results: pngmeta
|
||||
./pngmeta -quiet ct1n0g04.png > test1.xpt
|
||||
./pngmeta -soif -quiet ctzn0g04.png > test2.xpt
|
||||
./pngmeta -html -quiet 8859.png > test3.xpt
|
||||
./pngmeta -xrdf ct1n0g04.png > test4.xpt
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
68
Makefile.old
Normal file
68
Makefile.old
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# basic makefile for pngmeta
|
||||
#
|
||||
|
||||
PACKAGE=pngmeta
|
||||
VERSION=1.10
|
||||
|
||||
ZLIB=../zlib
|
||||
LIBPNG=../libpng
|
||||
|
||||
# Compile with GNU cc
|
||||
CC=gcc
|
||||
EXTRA_CC_FLAGS=-W -Wall
|
||||
|
||||
# If you are not using gcc, set these options (must be an ANSI C compiler)
|
||||
#CC=cc
|
||||
#EXTRA_CC_FLAGS=
|
||||
|
||||
|
||||
CFLAGS= -DPACKAGE=\"$(PACKAGE)\" -DVERSION=\"$(VERSION)\" $(EXTRA_CC_FLAGS) -I$(LIBPNG) -I$(ZLIB) -g
|
||||
LDFLAGS=-L$(LIBPNG) -L$(ZLIB) -lpng -lz -lm
|
||||
|
||||
# Need ranlib?
|
||||
#RANLIB=ranlib
|
||||
RANLIB=echo
|
||||
|
||||
INSTALL=install
|
||||
|
||||
# hierarchy where make install puts pngmeta
|
||||
prefix=/usr/local
|
||||
|
||||
|
||||
# Nothing needs configuring below here
|
||||
|
||||
TEMPDIR=/tmp
|
||||
|
||||
OBJS = pngmeta.o
|
||||
|
||||
all: build
|
||||
|
||||
build: pngmeta
|
||||
|
||||
pngmeta: $(OBJS)
|
||||
$(CC) -o pngmeta $(CCFLAGS) pngmeta.o $(LDFLAGS)
|
||||
|
||||
TESTS=test1 test2 test3 test4
|
||||
|
||||
check: pngmeta $(TESTS)
|
||||
for test in $(TESTS); do \
|
||||
$$test; \
|
||||
done
|
||||
|
||||
test-results: pngmeta
|
||||
./pngmeta -quiet ct1n0g04.png > test1.xpt
|
||||
./pngmeta -soif -quiet ctzn0g04.png > test2.xpt
|
||||
./pngmeta -html -quiet 8859.png > test3.xpt
|
||||
./pngmeta -xrdf ct1n0g04.png > test4.xpt
|
||||
|
||||
install: pngmeta
|
||||
-@mkdir $(prefix)/bin
|
||||
$(INSTALL) -c pngmeta $(prefix)/bin
|
||||
$(INSTALL) -c pngmeta.1 $(prefix)/man/man1/pngmeta.1
|
||||
|
||||
pngmeta.man: pngmeta.1
|
||||
nroff -man $? > pngmeta.man
|
||||
|
||||
clean:
|
||||
rm -f *.o pngmeta.man pngmeta *~
|
||||
40
NEWS
Normal file
40
NEWS
Normal file
@@ -0,0 +1,40 @@
|
||||
Changes
|
||||
-------
|
||||
|
||||
Version
|
||||
1.10 Updated to use latest zlib (1.1.3), libpng (1.0.5o). Added
|
||||
GNU style --options including --help page and --version
|
||||
|
||||
1.9 Added -uri URI option to set URI for SOIF and RDF/XML output
|
||||
For RDF/XML output don't escape values starting with <RDF
|
||||
|
||||
1.8 Added RDF in XML output written by
|
||||
Dan Brickley <daniel.brickley@bristol.ac.uk>
|
||||
|
||||
1.7 Bug in printing out version.
|
||||
Updated to use GNU configure stuff.
|
||||
|
||||
1.6 libpng 1.0.0, zlib 1.1.1
|
||||
Does SOIF by default when program is PngImage.sum
|
||||
Version information output in usage and HTML.
|
||||
Use libpng time formatting routine.
|
||||
|
||||
1.4-1.5 libpng 0.87, 0.88, 0.88b, 0.89c and finally 0.90
|
||||
|
||||
1.3 Tidied up HTML output. Tested with libpng 0.86
|
||||
|
||||
1.2 Added HTML output in <DL><DT>field</DT><DD><P>value</P></DD>...</DL>
|
||||
form.
|
||||
|
||||
1.1 Now outputs image meta data: format, colors (bitdepth),
|
||||
width, height and image type in the style of the GIF
|
||||
summariser for Harvest V1.4 Only outputs this for SOIF format.
|
||||
|
||||
Prints modification time chunk (tIME) contents if present in
|
||||
RFC 1123 format, as suggested by PNG spec.
|
||||
|
||||
1.0 For libpng 0.85 }
|
||||
} Same functionality
|
||||
0.9 For libpng 0.81 }
|
||||
|
||||
|
||||
151
README
Normal file
151
README
Normal file
@@ -0,0 +1,151 @@
|
||||
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
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
/*
|
||||
This is the master branch of the "pmt" tree.
|
||||
Individual projects are in separate branches,
|
||||
e.g. pngcrush is in the "pngcrush" branch.
|
||||
*/
|
||||
103
aclocal.m4
vendored
Normal file
103
aclocal.m4
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.2
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AM_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_PROG_INSTALL,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
AC_SUBST(INSTALL_SCRIPT)dnl
|
||||
])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
145
configure.in
Normal file
145
configure.in
Normal file
@@ -0,0 +1,145 @@
|
||||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl $Source: /home/cur/djb1/develop/pngmeta/pngmeta/RCS/configure.in,v $
|
||||
dnl
|
||||
dnl $Id: configure.in,v 1.4 2000/01/31 13:52:24 djb1 Exp $
|
||||
dnl
|
||||
dnl (C) Copyright 1998, Dave Beckett, University of Kent at Canterbury
|
||||
dnl
|
||||
|
||||
AC_REVISION($Revision: 1.4 $)
|
||||
AC_INIT(pngmeta.c)
|
||||
AM_INIT_AUTOMAKE(pngmeta, [1.10])
|
||||
AC_PREREQ(2.12)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
|
||||
|
||||
|
||||
|
||||
# Allow use of libpng and zlib from raw distributions
|
||||
PNG_INCLUDE=/usr/include # prefix?
|
||||
AC_ARG_WITH(png,
|
||||
[ --with-png=DIR DIR is root for libpng distribution])
|
||||
|
||||
AC_MSG_CHECKING(for local copy of libpng distribution)
|
||||
if test "X$with_png" = "X"; then
|
||||
for dir in libpng-[0-9]* libpng ../libpng-[0-9]* ../libpng; do
|
||||
if test -d $dir -a -f $dir/png.h; then
|
||||
with_png=$dir
|
||||
LIBS="$LIBS -lpng"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$with_png" != "X"; then
|
||||
AC_MSG_RESULT($with_png)
|
||||
LDFLAGS="$LDFLAGS -L$with_png"
|
||||
PNG_INCLUDE=$with_png
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
ZLIB_INCLUDE=/usr/include # prefix?
|
||||
AC_ARG_WITH(zlib,
|
||||
[ --with-zlib=DIR DIR is root for libz distribution])
|
||||
|
||||
AC_MSG_CHECKING(for local copy of zlib distribution)
|
||||
if test "X$with_zlib" = "X"; then
|
||||
for dir in zlib-[0-9]* zlib ../zlib-[0-9]* ../zlib; do
|
||||
if test -d $dir -a -f $dir/zlib.h; then
|
||||
with_zlib=$dir
|
||||
LIBS="$LIBS -lz"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$with_zlib" != "X"; then
|
||||
AC_MSG_RESULT($with_zlib)
|
||||
LDFLAGS="$LDFLAGS -L$with_zlib"
|
||||
ZLIB_INCLUDE=$with_zlib
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
# Allow use of libpng and zlib from installed areas
|
||||
AC_ARG_WITH(zlib_lib,
|
||||
[ --with-zlib-lib=LIB LIB is path to libz.a])
|
||||
if test "X$with_zlib_lib" != "X"; then
|
||||
LDFLAGS="$LDFLAGS -L$with_zlib_lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(z, zlibVersion, [LIBS="$LIBS -lz"],
|
||||
[ AC_MSG_ERROR(could not find libz)]
|
||||
)
|
||||
|
||||
# libpng always needs this
|
||||
LIBS="$LIBS -lm"
|
||||
|
||||
AC_ARG_WITH(png_lib,
|
||||
[ --with-png-lib=LIB LIB is path to libpng.a])
|
||||
if test "X$with_png_lib" != "X"; then
|
||||
LDFLAGS="$LDFLAGS -L$with_png_lib"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(png, png_create_read_struct, [LIBS="-lpng $LIBS"],
|
||||
[ AC_MSG_ERROR(could not find libpng)]
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_MSG_CHECKING(for location of png includes)
|
||||
AC_ARG_WITH(png-includes,
|
||||
[ --with-png-includes=DIR DIR is path where PNG header files can be
|
||||
found, defaults to /usr/include])
|
||||
if test "X$with_png_includes" != "X"; then
|
||||
PNG_INCLUDE=$with_png_includes
|
||||
fi
|
||||
if test ! -f "$PNG_INCLUDE/png.h"; then
|
||||
AC_MSG_ERROR(could not find png.h in $PNG_INCLUDE)
|
||||
fi
|
||||
if test ! -f "$PNG_INCLUDE/pngconf.h"; then
|
||||
AC_MSG_ERROR(could not find pngconf.h in $PNG_INCLUDE)
|
||||
fi
|
||||
AC_MSG_RESULT($PNG_INCLUDE)
|
||||
AC_SUBST(PNG_INCLUDE)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(for location of zlib includes)
|
||||
AC_ARG_WITH(zlib-includes,
|
||||
[ --with-zlib-includes=DIR DIR is path where ZLIB header files can be
|
||||
found, defaults to /usr/include])
|
||||
if test "X$with_zlib_includes" != "X"; then
|
||||
ZLIB_INCLUDE=$with_zlib_includes
|
||||
fi
|
||||
if test ! -f "$ZLIB_INCLUDE/zlib.h"; then
|
||||
AC_MSG_ERROR(could not find zlib.h in $ZLIB_INCLUDE)
|
||||
fi
|
||||
if test ! -f "$ZLIB_INCLUDE/zconf.h"; then
|
||||
AC_MSG_ERROR(could not find zconf.h in $ZLIB_INCLUDE)
|
||||
fi
|
||||
AC_MSG_RESULT($ZLIB_INCLUDE)
|
||||
AC_SUBST(ZLIB_INCLUDE)
|
||||
|
||||
|
||||
## I have no idea why autoconf makes me need to do this.
|
||||
## Of course on M$DOS it should be .exe
|
||||
EXEEXT=
|
||||
AC_SUBST(EXEEXT)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
AC_OUTPUT(Makefile)
|
||||
BIN
ct1n0g04.png
Normal file
BIN
ct1n0g04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 796 B |
BIN
ctzn0g04.png
Normal file
BIN
ctzn0g04.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 757 B |
250
install-sh
Executable file
250
install-sh
Executable file
@@ -0,0 +1,250 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
188
missing
Executable file
188
missing
Executable file
@@ -0,0 +1,188 @@
|
||||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
|
||||
error status if there is no known handling for PROGRAM.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal touch file \`aclocal.m4'
|
||||
autoconf touch file \`configure'
|
||||
autoheader touch file \`config.h.in'
|
||||
automake touch all \`Makefile.in' files
|
||||
bison create \`y.tab.[ch]', if possible, from existing .[ch]
|
||||
flex create \`lex.yy.c', if possible, from existing .c
|
||||
lex create \`lex.yy.c', if possible, from existing .c
|
||||
makeinfo touch the output file
|
||||
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing - GNU libit 0.0"
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aclocal)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acinclude.m4' or \`configure.in'. You might want
|
||||
to install the \`Automake' and \`Perl' packages. Grab them from
|
||||
any GNU archive site."
|
||||
touch aclocal.m4
|
||||
;;
|
||||
|
||||
autoconf)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`configure.in'. You might want to install the
|
||||
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
|
||||
archive site."
|
||||
touch configure
|
||||
;;
|
||||
|
||||
autoheader)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`acconfig.h' or \`configure.in'. You might want
|
||||
to install the \`Autoconf' and \`GNU m4' packages. Grab them
|
||||
from any GNU archive site."
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
|
||||
if test -z "$files"; then
|
||||
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
|
||||
test -z "$files" || files="$files.in"
|
||||
else
|
||||
files=`echo "$files" | sed -e 's/:/ /g'`
|
||||
fi
|
||||
test -z "$files" && files="config.h.in"
|
||||
touch $files
|
||||
;;
|
||||
|
||||
automake)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
|
||||
You might want to install the \`Automake' and \`Perl' packages.
|
||||
Grab them from any GNU archive site."
|
||||
find . -type f -name Makefile.am -print \
|
||||
| sed 's/^\(.*\).am$/touch \1.in/' \
|
||||
| sh
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.y' file. You may need the \`Bison' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Bison' from any GNU archive site."
|
||||
rm -f y.tab.c y.tab.h
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.y)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.c
|
||||
fi
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" y.tab.h
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f y.tab.h ]; then
|
||||
echo >y.tab.h
|
||||
fi
|
||||
if [ ! -f y.tab.c ]; then
|
||||
echo 'main() { return 0; }' >y.tab.c
|
||||
fi
|
||||
;;
|
||||
|
||||
lex|flex)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.l' file. You may need the \`Flex' package
|
||||
in order for those modifications to take effect. You can get
|
||||
\`Flex' from any GNU archive site."
|
||||
rm -f lex.yy.c
|
||||
if [ $# -ne 1 ]; then
|
||||
eval LASTARG="\${$#}"
|
||||
case "$LASTARG" in
|
||||
*.l)
|
||||
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
|
||||
if [ -f "$SRCFILE" ]; then
|
||||
cp "$SRCFILE" lex.yy.c
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -f lex.yy.c ]; then
|
||||
echo 'main() { return 0; }' >lex.yy.c
|
||||
fi
|
||||
;;
|
||||
|
||||
makeinfo)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is missing on your system. You should only need it if
|
||||
you modified a \`.texi' or \`.texinfo' file, or any other file
|
||||
indirectly affecting the aspect of the manual. The spurious
|
||||
call might also be the consequence of using a buggy \`make' (AIX,
|
||||
DU, IRIX). You might want to install the \`Texinfo' package or
|
||||
the \`GNU make' package. Grab either from any GNU archive site."
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
|
||||
fi
|
||||
touch $file
|
||||
;;
|
||||
|
||||
*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, and you do not seem to have it handy on your
|
||||
system. You might have modified some files without having the
|
||||
proper tools for further handling them. Check the \`README' file,
|
||||
it often tells you about the needed prerequirements for installing
|
||||
this package. You may also peek at any GNU archive site, in case
|
||||
some other package would contain this missing \`$1' program."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
40
mkinstalldirs
Executable file
40
mkinstalldirs
Executable file
@@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id: mkinstalldirs,v 1.10 1996/05/03 07:37:52 friedman Exp $
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
||||
139
pngmeta.1
Normal file
139
pngmeta.1
Normal file
@@ -0,0 +1,139 @@
|
||||
.TH PNGMETA 1 "10 March 1998"
|
||||
.\"
|
||||
.\" Manual page for pngmeta - see end of page for copyright
|
||||
.\"
|
||||
.\" $Source: /home/cur/djb1/develop/pngmeta/pngmeta/RCS/pngmeta.1,v $
|
||||
.\"
|
||||
.\" $Id: pngmeta.1,v 1.4 2000/01/31 14:05:45 djb1 Exp $
|
||||
.\"
|
||||
.SH NAME
|
||||
pngmeta \- extract metadata from Portable Network Graphics (PNG) image files
|
||||
.SH SYNOPSIS
|
||||
.B pngmeta
|
||||
.RB [ \--soif ]
|
||||
.RB [ \--html ]
|
||||
.RB [ \--xrdf ]
|
||||
.RB [ \--all ]
|
||||
.RB [ \--quiet ]
|
||||
.RB [ \--uri\ URI ]
|
||||
.RI [ filename ]
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.I pngmeta
|
||||
filter outputs the metadata from Portable Network Graphics (PNG)
|
||||
format image files in one of these formats:
|
||||
.LP
|
||||
1. Simple key: value
|
||||
.LP
|
||||
2. SOIF format (as used by the Harvest system, version 1.4).
|
||||
.IP
|
||||
As such it can be used as a Summarizer for the Harvest Essence system.
|
||||
It could also be used by other indexers to extract data for
|
||||
indexing PNG images.
|
||||
.LP
|
||||
3. HTML page
|
||||
With each element as an element in a descriptive (DL) list
|
||||
.LP
|
||||
4. XML/RDF
|
||||
With each element as an RDF property on the source URI.
|
||||
.LP
|
||||
In the absence of options, the program operates as a filter,
|
||||
accepting input from stdin and sending output to stdout.
|
||||
If a single file name is given,
|
||||
it is assumed to correspond to a PNG file,
|
||||
and is processed.
|
||||
.SH FORMAT OPTIONS
|
||||
.TP
|
||||
.B \--soif
|
||||
Format output using (Harvest) SOIF format. This is the default if
|
||||
the program is called PngImage.sum.
|
||||
.TP
|
||||
.B \--html
|
||||
Format output in HTML, with each field/value as an element in a descriptive
|
||||
.RB ( DL )
|
||||
list.
|
||||
.TP
|
||||
.B \--xrdf
|
||||
Format output in RDF/XML, with each field/value as an element in a descriptive
|
||||
.RB ( DL )
|
||||
list.
|
||||
.SH OTHER OPTIONS
|
||||
.TP
|
||||
.B \--all
|
||||
Output all the information about the image size, depth etc. even if
|
||||
not usually printed.
|
||||
.TP
|
||||
.B \--quiet
|
||||
Suppress the output of the banner for plain text output.
|
||||
.B \--uri URI
|
||||
Set the URI that is used for the SOIF and XML/RDF outputs. By
|
||||
default this will be the filename, or "stdin" if this is the program
|
||||
is used as a filter.
|
||||
.TP
|
||||
.B \--help
|
||||
Show a usage message
|
||||
.TP
|
||||
.B \--version
|
||||
Show the program and library versions
|
||||
.SH FILES
|
||||
.TP 2.2i
|
||||
.I pngmeta
|
||||
executable
|
||||
.SH "SEE ALSO"
|
||||
.IR gif2png (1),
|
||||
.IR libpng (3),
|
||||
.IR pbm (1),
|
||||
.IR pgm (1),
|
||||
.IR pngcheck (1),
|
||||
.IR pngtopnm (1),
|
||||
.IR pnm (5),
|
||||
.IR pnmgamma (1),
|
||||
.IR pnmtopng (1),
|
||||
.IR ptot (1),
|
||||
.IR tiff2png (1),
|
||||
.IR zlib (3)
|
||||
.LP
|
||||
For information about Harvest and its SOIF format:
|
||||
.IP
|
||||
http://harvest.cs.colorado.edu/
|
||||
.LP
|
||||
For
|
||||
.IR PNG
|
||||
.IP
|
||||
http://www.cdrom.com/pub/png/
|
||||
.LP
|
||||
For
|
||||
.IR "libpng library:"
|
||||
.IP
|
||||
ftp://swrinde.nde.swri.edu/pub/png/src/
|
||||
.br
|
||||
http://www.cdrom.com/pub/png/src/
|
||||
.LP
|
||||
For
|
||||
.IR zlib
|
||||
.IP
|
||||
http://www.cdrom.com/pub/infozip/zlib/
|
||||
.LP
|
||||
For
|
||||
.IR "zlib library:"
|
||||
.IP
|
||||
http://www.cdrom.com/pub/infozip/zlib/
|
||||
.SH AUTHORS
|
||||
Version 1.10.
|
||||
Dave Beckett (D.J.Beckett@ukc.ac.uk).
|
||||
.LP
|
||||
The
|
||||
.IR zlib (3)
|
||||
library required by
|
||||
.I pngmeta
|
||||
is copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler.
|
||||
Some code was modified from the code for the
|
||||
.IR libpng (3)
|
||||
library function
|
||||
.B png_read_end()
|
||||
which is copyright (c) Guy Eric Schalnat, Andreas Dilger, Glenn
|
||||
Randers-Pehrson and others -- see the source for details.
|
||||
.LP
|
||||
Original UNIX manual page by R. P. C. Rodgers,
|
||||
U.S. National Library of Medicine (rodgers@nlm.nih.gov).
|
||||
.\" end of man page
|
||||
569
pngmeta.c
Normal file
569
pngmeta.c
Normal file
@@ -0,0 +1,569 @@
|
||||
/* pngmeta - PNG metadata filter to text, SOIF or HTML
|
||||
|
||||
For libpng 1.0.0 and zlib version 1.1.1 (or later)
|
||||
|
||||
tested up to libpng 1.0.5o and zlib 1.1.3
|
||||
|
||||
(C) Copyright Dave Beckett <D.J.Beckett@ukc.ac.uk>,
|
||||
University of Kent at Canterbury, UK
|
||||
http://www.cs.ukc.ac.uk/people/staff/djb1/
|
||||
|
||||
RDF support by daniel.brickley@bristol.ac.uk
|
||||
|
||||
$Source: /home/cur/djb1/develop/pngmeta/pngmeta/RCS/pngmeta.c,v $
|
||||
|
||||
$Id: pngmeta.c,v 1.10 2000/01/31 13:51:46 djb1 Exp $
|
||||
|
||||
The function png_skip_till_end() is a modified version of
|
||||
png_read_end() from libpng 1.0.0 by
|
||||
Guy Eric Schalnat, Group 42, Inc.
|
||||
Andreas Eric Dilger and Glenn Randers-Pehrson
|
||||
as well as many others. The original copyright message follows.
|
||||
*/
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* libpng 1.0.0
|
||||
* For conditions of distribution and use, see copyright notice in png.h
|
||||
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
|
||||
* Copyright (c) 1996, 1997 Andreas Dilger
|
||||
* Copyright (c) 1998, Glenn Randers-Pehrson
|
||||
* March 8, 1998
|
||||
*
|
||||
* This file contains routines that an application calls directly to
|
||||
* read a PNG file or stream.
|
||||
*/
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
|
||||
[DJB: edited to just leave COPYRIGHT NOTICE ]
|
||||
|
||||
*
|
||||
* COPYRIGHT NOTICE:
|
||||
*
|
||||
* The PNG Reference Library is supplied "AS IS". The Contributing Authors
|
||||
* and Group 42, Inc. disclaim all warranties, expressed or implied,
|
||||
* including, without limitation, the warranties of merchantability and of
|
||||
* fitness for any purpose. The Contributing Authors and Group 42, Inc.
|
||||
* assume no liability for direct, indirect, incidental, special, exemplary,
|
||||
* or consequential damages, which may result from the use of the PNG
|
||||
* Reference Library, even if advised of the possibility of such damage.
|
||||
*
|
||||
* Permission is hereby granted to use, copy, modify, and distribute this
|
||||
* source code, or portions hereof, for any purpose, without fee, subject
|
||||
* to the following restrictions:
|
||||
* 1. The origin of this source code must not be misrepresented.
|
||||
* 2. Altered versions must be plainly marked as such and must not be
|
||||
* misrepresented as being the original source.
|
||||
* 3. This Copyright notice may not be removed or altered from any source or
|
||||
* altered source distribution.
|
||||
*
|
||||
* The Contributing Authors and Group 42, Inc. specifically permit, without
|
||||
* fee, and encourage the use of this source code as a component to
|
||||
* supporting the PNG file format in commercial products. If you use this
|
||||
* source code in a product, acknowledgment is not required but would be
|
||||
* appreciated.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
||||
/* Needed to access various internal PNG chunk routines */
|
||||
#define PNG_INTERNAL
|
||||
#include <png.h>
|
||||
|
||||
#ifdef __TURBOC__
|
||||
#include <mem.h>
|
||||
#endif
|
||||
|
||||
/* defined so I can write to a file on gui/windowing platforms */
|
||||
/* #define STDERR stderr */
|
||||
#ifdef MSDOS
|
||||
#define STDERR stdout /* for DOS */
|
||||
#else
|
||||
#define STDERR stderr
|
||||
#endif
|
||||
|
||||
void png_skip_till_end PNGARG((png_structp png_ptr, png_infop info));
|
||||
void html_quote_string PNGARG((FILE *fd, const char *string));
|
||||
void print_init PNGARG((FILE *fd, int output_type, const char *filename, const char *uri, int quiet));
|
||||
void print_kv PNGARG((FILE *fd, int output_type, const char *field, const char *value));
|
||||
void print_finish PNGARG((FILE *fd, int output_type));
|
||||
void user_warning_fn PNGARG((png_structp png_ptr, png_const_charp warning_msg));
|
||||
|
||||
|
||||
const char *progname;
|
||||
|
||||
|
||||
/* read data, ignoring IDATs, till the end of the png file.
|
||||
|
||||
Will not read past the end of the file, will verify the end is
|
||||
accurate, and will read any comments or time information at the
|
||||
end of the file, if info is not NULL. */
|
||||
void
|
||||
png_skip_till_end(png_structp png_ptr, png_infop info_ptr)
|
||||
{
|
||||
png_byte chunk_length[4];
|
||||
png_uint_32 length;
|
||||
|
||||
length=png_ptr->idat_size;
|
||||
|
||||
/* Skip IDAT chunks */
|
||||
do
|
||||
{
|
||||
png_crc_finish(png_ptr, length);
|
||||
|
||||
png_read_data(png_ptr, chunk_length, 4);
|
||||
length = png_get_uint_32(chunk_length);
|
||||
|
||||
png_reset_crc(png_ptr);
|
||||
png_crc_read(png_ptr, png_ptr->chunk_name, 4);
|
||||
} while (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4));
|
||||
|
||||
png_ptr->mode |= PNG_AFTER_IDAT;
|
||||
|
||||
do
|
||||
{
|
||||
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
|
||||
png_handle_IHDR(png_ptr, info_ptr, length);
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
|
||||
{
|
||||
/* Zero length IDATs are legal after the last IDAT has been
|
||||
* read, but not after other chunks have been read.
|
||||
*/
|
||||
if (length > 0 || png_ptr->mode & PNG_AFTER_IDAT)
|
||||
png_error(png_ptr, "Too many IDAT's found");
|
||||
else
|
||||
png_crc_finish(png_ptr, 0);
|
||||
}
|
||||
#if defined(PNG_READ_tIME_SUPPORTED)
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_tIME, 4))
|
||||
png_handle_tIME(png_ptr, info_ptr, length);
|
||||
#endif
|
||||
#if defined(PNG_READ_tEXt_SUPPORTED)
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_tEXt, 4))
|
||||
png_handle_tEXt(png_ptr, info_ptr, length);
|
||||
#endif
|
||||
#if defined(PNG_READ_zTXt_SUPPORTED)
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_zTXt, 4))
|
||||
png_handle_zTXt(png_ptr, info_ptr, length);
|
||||
#endif
|
||||
else if (!png_memcmp(png_ptr->chunk_name, png_IEND, 4))
|
||||
png_handle_IEND(png_ptr, info_ptr, length);
|
||||
else
|
||||
png_handle_unknown(png_ptr, info_ptr, length);
|
||||
|
||||
if (!(png_ptr->mode & PNG_HAVE_IEND)) {
|
||||
png_read_data(png_ptr, chunk_length, 4);
|
||||
length = png_get_uint_32(chunk_length);
|
||||
|
||||
png_reset_crc(png_ptr);
|
||||
png_crc_read(png_ptr, png_ptr->chunk_name, 4);
|
||||
}
|
||||
|
||||
} while (!(png_ptr->mode & PNG_HAVE_IEND));
|
||||
}
|
||||
|
||||
|
||||
#define OUTPUT_TEXT 0
|
||||
#define OUTPUT_SOIF 1
|
||||
#define OUTPUT_HTML 2
|
||||
#define OUTPUT_XRDF 3
|
||||
|
||||
|
||||
void html_quote_string(FILE *fd, const char *string)
|
||||
{
|
||||
char c;
|
||||
char const * p=string;
|
||||
while ((c = *p++)) {
|
||||
if (c == '&')
|
||||
fputs("&", fd);
|
||||
else if (c== '<')
|
||||
fputs("<", fd);
|
||||
else if (c== '>')
|
||||
fputs(">", fd);
|
||||
else
|
||||
fputc(c, fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void print_init(FILE *fd, int output_type, const char *filename,
|
||||
const char *uri, int quiet)
|
||||
{
|
||||
switch (output_type)
|
||||
{
|
||||
case OUTPUT_SOIF:
|
||||
if (uri)
|
||||
fprintf(fd, "@FILE { %s\n", uri);
|
||||
else
|
||||
fprintf(fd, "@FILE { %s\n", filename);
|
||||
break;
|
||||
|
||||
case OUTPUT_HTML:
|
||||
fputs("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>\n", fd);
|
||||
fputs("<HTML>\n<HEAD>\n<TITLE>Metadata for ", fd);
|
||||
html_quote_string(fd, filename);
|
||||
fputs("</TITLE>\n</HEAD>\n<BODY>\n<H1>Metadata for ", fd);
|
||||
html_quote_string(fd, filename);
|
||||
fputs("</H1>\n<DL>\n", fd);
|
||||
break;
|
||||
|
||||
case OUTPUT_XRDF:
|
||||
fputs("<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\n", fd);
|
||||
fputs(" xmlns:s='http://www.tasi.ac.uk/rdf/vocab#'\n", fd);
|
||||
fputs(" xmlns:dc='http://purl.org/dc/elements/1.0/'>\n", fd);
|
||||
|
||||
if (uri)
|
||||
fprintf(fd, " <s:Image about=\"%s\"\n", uri);
|
||||
else {
|
||||
fputs(" <s:Image about=\"", fd);
|
||||
html_quote_string(fd, filename);
|
||||
fputs("\">\n", fd);
|
||||
}
|
||||
fputs(" <dc:type>image/png</dc:type>\n", fd);
|
||||
|
||||
break;
|
||||
|
||||
default: /* OUTPUT_TEXT */
|
||||
if (!quiet)
|
||||
fprintf(fd, "%s: PNG metadata for %s:\n", progname, filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void print_kv(FILE *fd, int output_type, const char *field, const char *value)
|
||||
{
|
||||
if (*value)
|
||||
switch (output_type)
|
||||
{
|
||||
case OUTPUT_SOIF:
|
||||
/* SOIF: "KEY{SIZE}:\tVALUE\n" */
|
||||
fprintf(fd, "%s{%d}:\t%s\n", field, (int)strlen(value), value);
|
||||
break;
|
||||
|
||||
case OUTPUT_HTML:
|
||||
/* HTML: <DT>field</DT>\n<DD><P>value</P></DD>\n" */
|
||||
fputs(" <DT>", fd);
|
||||
html_quote_string(fd, field);
|
||||
fputs("</DT>\n <DD><P>", fd);
|
||||
html_quote_string(fd, value);
|
||||
fputs("</P></DD>\n\n", fd);
|
||||
break;
|
||||
|
||||
case OUTPUT_XRDF:
|
||||
/* RDF: simple flat text properties */
|
||||
|
||||
/* start tag */
|
||||
fputs(" <s:", fd);
|
||||
html_quote_string(fd, field);
|
||||
fputs(">", fd);
|
||||
|
||||
/* If value starts with <RDF, assume it is RDF and don't
|
||||
HTML escape it */
|
||||
if (!strncasecmp(value, "<RDF", 4))
|
||||
fputs(value, fd);
|
||||
else
|
||||
html_quote_string(fd, value);
|
||||
|
||||
/* end tag */
|
||||
fputs("</s:", fd);
|
||||
html_quote_string(fd, field);
|
||||
fputs(">\n", fd);
|
||||
break;
|
||||
|
||||
default: /* OUTPUT_TEXT */
|
||||
fprintf(fd, "%s: %s\n", field, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void print_finish(FILE *fd, int output_type)
|
||||
{
|
||||
switch (output_type)
|
||||
{
|
||||
case OUTPUT_SOIF:
|
||||
fputs("}\n", fd);
|
||||
break;
|
||||
|
||||
case OUTPUT_HTML:
|
||||
fprintf(fd, "</DL>\n\n<SMALL>Created by %s V%s</SMALL>\n\n</BODY>\n</HTML>\n", progname, VERSION);
|
||||
break;
|
||||
|
||||
case OUTPUT_XRDF:
|
||||
fprintf(fd, " </s:Image>\n</rdf:RDF>\n\n<!--Created by %s V%s -->\n", progname, VERSION);
|
||||
break;
|
||||
|
||||
/* case OUTPUT_TEXT / default */
|
||||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static const char *png_color_type[] = {
|
||||
"Grayscale",
|
||||
"Undefined type",
|
||||
"RGB",
|
||||
"Palette",
|
||||
"Grayscale with Alpha",
|
||||
"Undefined type",
|
||||
"RGB with Alpha"
|
||||
};
|
||||
|
||||
|
||||
/* Throw away warnings (die on errors as usual) */
|
||||
void user_warning_fn (png_structp png_ptr, png_const_charp warning_msg)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* MAIN BODY */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
png_infop end_info;
|
||||
FILE *in_fp = stdin;
|
||||
FILE *out_fp = stdout;
|
||||
const char *pngfile = "stdin";
|
||||
int output_type = OUTPUT_TEXT;
|
||||
int quiet = 0;
|
||||
int all = 0;
|
||||
int usingfile = 0;
|
||||
int usage = 0;
|
||||
int help = 0;
|
||||
int version = 0;
|
||||
int i;
|
||||
char *p;
|
||||
char *uri= NULL;
|
||||
|
||||
|
||||
/* Make progname just become the program name, not the full path -
|
||||
this is file system type specific since / is used as the
|
||||
separator */
|
||||
progname = *argv++; argc--;
|
||||
if((p=strrchr(progname, '/')))
|
||||
progname=p+1;
|
||||
|
||||
|
||||
/* Automagically output SOIF when this program is called PngImage.sum */
|
||||
if(!strcmp(progname, "PngImage.sum"))
|
||||
output_type = OUTPUT_SOIF;
|
||||
|
||||
/* Automagically output RDF when this program is called PngImage.rdfsum */
|
||||
if(!strcmp(progname, "PngImage.rdfsum"))
|
||||
output_type = OUTPUT_XRDF;
|
||||
|
||||
|
||||
while (*argv) {
|
||||
char *arg=argv[0];
|
||||
int l=strlen(arg);
|
||||
|
||||
if (*arg != '-')
|
||||
break;
|
||||
|
||||
if(l < 2) {
|
||||
usage=1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (arg[0] == '-' && arg[1] != '-') {
|
||||
arg++;
|
||||
} else {
|
||||
/* found '--' or equivalent */
|
||||
if (l==2) {
|
||||
argv++;
|
||||
argc--;
|
||||
break;
|
||||
}
|
||||
arg+=2;
|
||||
}
|
||||
|
||||
|
||||
if (!strcmp(arg, "soif")) {
|
||||
output_type = OUTPUT_SOIF;
|
||||
} else if (!strcmp(arg, "html")) {
|
||||
output_type = OUTPUT_HTML;
|
||||
} else if (!strcmp(arg, "xrdf")) {
|
||||
output_type = OUTPUT_XRDF;
|
||||
} else if (!strcmp(arg, "quiet")) {
|
||||
quiet = 1;
|
||||
} else if (!strcmp(arg, "all")) {
|
||||
all = 1;
|
||||
} else if (!strcmp(arg, "help")) {
|
||||
help = 1;
|
||||
break;
|
||||
} else if (!strcmp(arg, "version")) {
|
||||
version = 1;
|
||||
break;
|
||||
} else if (!strcmp(arg, "uri")) {
|
||||
argv++;
|
||||
argc--;
|
||||
if (!argc) {
|
||||
fprintf(STDERR, "%s: option --uri requires an argument\n", progname);
|
||||
usage=1;
|
||||
} else {
|
||||
uri=*argv;
|
||||
}
|
||||
} else {
|
||||
fprintf(STDERR, "%s: invalid option -- %s\n", progname, arg);
|
||||
usage = 1;
|
||||
break;
|
||||
}
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
|
||||
if (!usage && !help && !version) {
|
||||
if (!argc)
|
||||
/* nop */;
|
||||
else if (argc == 1) {
|
||||
pngfile = *argv;
|
||||
if (!(in_fp = fopen (pngfile, "rb"))) {
|
||||
fprintf(STDERR, "%s: Could not open input file %s - ", progname, pngfile);
|
||||
fflush(STDERR);
|
||||
perror(NULL);
|
||||
exit(1);
|
||||
}
|
||||
usingfile = 1;
|
||||
} else {
|
||||
usage = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(usage) {
|
||||
fprintf(STDERR, "Try `%s --help' for more information\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (help || version) {
|
||||
fprintf(STDERR, "%s %s (built with libpng %s and zlib %s)\n", progname, VERSION, PNG_LIBPNG_VER_STRING, ZLIB_VERSION);
|
||||
if (help) {
|
||||
fprintf(STDERR, "USAGE: %s [OPTIONS]... FILE\n", progname);
|
||||
fprintf(STDERR, "Display metadata information from a PNG image in FILE\n\n");
|
||||
fprintf(STDERR, " --all output information about image size etc.\n");
|
||||
fprintf(STDERR, " --html format output in HTML format\n");
|
||||
fprintf(STDERR, " --quiet suppress output of banner\n");
|
||||
fprintf(STDERR, " --soif format output in SOIF format\n");
|
||||
fprintf(STDERR, " --uri URI set the URI for SOIF and XML/RDF formats\n");
|
||||
fprintf(STDERR, " --xrdf format output in XML/RDF format\n");
|
||||
fprintf(STDERR, " --help display this help and exit\n");
|
||||
fprintf(STDERR, " --version output version information and exit\n");
|
||||
fprintf(STDERR, "\n(C) Copyright 2000 Dave Beckett, University of Kent at Canterbury\nhttp://www.cs.ukc.ac.uk/people/staff/djb1/\n");
|
||||
fprintf(STDERR, "RDF output by daniel.brickley@bristol.ac.uk\n");
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
||||
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,
|
||||
(void*)NULL, NULL, user_warning_fn);
|
||||
if (!png_ptr) {
|
||||
fprintf(STDERR, "%s: libpng failed to create read structure\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
if (!info_ptr)
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, (png_infopp)NULL, (png_infopp)NULL);
|
||||
fprintf(STDERR, "%s: libpng failed to create info structure\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* This is necessary to zero text pointers */
|
||||
end_info = png_create_info_struct(png_ptr);
|
||||
if (!end_info)
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
|
||||
fprintf(STDERR, "%s: libpng failed to create end info structure\n", progname);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
if (setjmp(png_ptr->jmpbuf))
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
|
||||
fprintf(STDERR, "%s: libpng read error for %s\n", progname, pngfile);
|
||||
fclose(in_fp);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
/* Initialise data input */
|
||||
png_init_io(png_ptr, in_fp);
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
|
||||
print_init(out_fp, output_type, pngfile, uri, quiet);
|
||||
|
||||
if (output_type == OUTPUT_SOIF || all) {
|
||||
/*
|
||||
Harvest V1.4 GIF summarizer outputs this:
|
||||
|
||||
image-format: GIF87|GIF89
|
||||
image-colors: [bits-per-pixel]
|
||||
Comment: [GIF Comment Extension text]
|
||||
image-width: [w]
|
||||
image-height: [h]
|
||||
image-type: interlaced|non-interlaced
|
||||
thumbnail-data: [data for 64x64 GIF image]
|
||||
|
||||
The latter is done via:
|
||||
giftopnm giffile | pnmscale -width 64 -height 64 | ppmquant 256 | ppmtogif
|
||||
|
||||
*/
|
||||
char value[80]; /* Sorry for the fixed-size buffer (big enough) */
|
||||
|
||||
print_kv(out_fp, output_type, "image-format", "PNG");
|
||||
|
||||
sprintf(value, "%d", info_ptr->bit_depth);
|
||||
print_kv(out_fp, output_type, "image-colors", value);
|
||||
|
||||
sprintf(value, "%ld", info_ptr->width);
|
||||
print_kv(out_fp, output_type, "image-width", value);
|
||||
|
||||
sprintf(value, "%ld", info_ptr->height);
|
||||
print_kv(out_fp, output_type, "image-height", value);
|
||||
|
||||
sprintf(value, "%s, %sinterlaced",
|
||||
(info_ptr->color_type>6) ? png_color_type[1] : png_color_type[info_ptr->color_type],
|
||||
info_ptr->interlace_type ? "" : "non-");
|
||||
|
||||
print_kv(out_fp, output_type, "image-type", value);
|
||||
}
|
||||
|
||||
/* Local function */
|
||||
png_skip_till_end(png_ptr, end_info);
|
||||
|
||||
|
||||
/* Print text keywords before IDAT */
|
||||
for (i = 0; i < info_ptr->num_text; i++)
|
||||
print_kv(out_fp, output_type, info_ptr->text[i].key, info_ptr->text[i].text);
|
||||
|
||||
/* Print text keywords after IDAT */
|
||||
for (i = 0; i < end_info->num_text; i++)
|
||||
print_kv(out_fp, output_type, end_info->text[i].key, end_info->text[i].text);
|
||||
|
||||
/* Print modification time (tIME chunk) if present */
|
||||
if (info_ptr->valid & PNG_INFO_tIME)
|
||||
print_kv(out_fp, output_type, "Modification Time",
|
||||
png_convert_to_rfc1123(png_ptr, &info_ptr->mod_time));
|
||||
else if (end_info->valid & PNG_INFO_tIME)
|
||||
print_kv(out_fp, output_type, "Modification Time",
|
||||
png_convert_to_rfc1123(png_ptr, &end_info->mod_time));
|
||||
|
||||
print_finish(out_fp, output_type);
|
||||
|
||||
|
||||
/* Cleanup */
|
||||
png_read_destroy(png_ptr, info_ptr, end_info);
|
||||
|
||||
fclose(in_fp);
|
||||
|
||||
exit (0);
|
||||
}
|
||||
46
pngmeta.spec
Normal file
46
pngmeta.spec
Normal file
@@ -0,0 +1,46 @@
|
||||
#
|
||||
# pngmeta -- Get Metadata from PNG images
|
||||
#
|
||||
%define version 1.10
|
||||
%define name pngmeta
|
||||
Summary: Display metadata information from PNG images
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: 1
|
||||
Copyright: Freely Distributable
|
||||
Group: Applications/Graphics
|
||||
Source: http://www.cs.ukc.ac.uk/people/staff/djb1/software/%{name}-%{version}.tar.gz
|
||||
URL: http://www.cs.ukc.ac.uk/people/staff/djb1/software
|
||||
Provides: pngmeta
|
||||
Requires: libpng.so.2 zlib
|
||||
BuildRoot: /tmp/rpmbuild_%{name}
|
||||
|
||||
%description
|
||||
This small filter program extracts metadata from PNG images and
|
||||
displays them as either HTML, SOIF, RDF/XML or simple fields and
|
||||
values.
|
||||
|
||||
%prep
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
||||
|
||||
%setup
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr
|
||||
make
|
||||
|
||||
%install
|
||||
make install-strip prefix=$RPM_BUILD_ROOT/usr
|
||||
|
||||
%files
|
||||
|
||||
%doc %attr (-,root,root) NEWS
|
||||
%doc %attr (-,root,root) README
|
||||
|
||||
%attr (-,root,root) /usr/man/man1/pngmeta.1
|
||||
%attr (755,root,root) /usr/bin/pngmeta
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
|
||||
3
test1
Executable file
3
test1
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo 'Testing uncompressed text chunk - tEXT (plain format)'
|
||||
./pngmeta -quiet ct1n0g04.png | diff -c test1.xpt -
|
||||
11
test1.xpt
Normal file
11
test1.xpt
Normal file
@@ -0,0 +1,11 @@
|
||||
Title: PngSuite
|
||||
Author: Willem A.J. van Schaik
|
||||
(gwillem@ntuvax.ntu.ac.sg)
|
||||
Copyright: Copyright Willem van Schaik, Singapore 1995
|
||||
Description: 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: Created on a NeXTstation color using "pnmtopng".
|
||||
Disclaimer: Freeware.
|
||||
3
test2
Executable file
3
test2
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo 'Testing compressed text chunk - zTXT (SOIF format)'
|
||||
./pngmeta -soif -quiet ctzn0g04.png | diff -c test2.xpt -
|
||||
18
test2.xpt
Normal file
18
test2.xpt
Normal file
@@ -0,0 +1,18 @@
|
||||
@FILE { ctzn0g04.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.
|
||||
}
|
||||
3
test3
Executable file
3
test3
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo 'Testing HTML output'
|
||||
./pngmeta -html -quiet 8859.png | diff -c test3.xpt -
|
||||
39
test3.xpt
Normal file
39
test3.xpt
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Metadata for 8859.png</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H1>Metadata for 8859.png</H1>
|
||||
<DL>
|
||||
<DT>Title</DT>
|
||||
<DD><P>ISO 8859-1 characters</P></DD>
|
||||
|
||||
<DT>Description</DT>
|
||||
<DD><P>Here are all the printable characters from the
|
||||
ISO Latin-1 coded character set: hex codes 20 to 7E
|
||||
and A0 to FF. That includes a space (20) and a
|
||||
non-breaking space (A0).</P></DD>
|
||||
|
||||
<DT>Test data</DT>
|
||||
<DD><P>! " # $ % & ' ( ) * + , - . /
|
||||
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
|
||||
@ A B C D E F G H I J K L M N O
|
||||
P Q R S T U V W X Y Z [ \ ] ^ _
|
||||
` a b c d e f g h i j k l m n o
|
||||
p q r s t u v w x y z { | } ~
|
||||
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
<EFBFBD> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20> <20>
|
||||
</P></DD>
|
||||
|
||||
</DL>
|
||||
|
||||
<SMALL>Created by pngmeta V1.10</SMALL>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
3
test4
Executable file
3
test4
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo 'Testing RDF/XML output'
|
||||
./pngmeta -xrdf ct1n0g04.png | diff -c test4.xpt -
|
||||
20
test4.xpt
Normal file
20
test4.xpt
Normal file
@@ -0,0 +1,20 @@
|
||||
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
|
||||
xmlns:s='http://www.tasi.ac.uk/rdf/vocab#'
|
||||
xmlns:dc='http://purl.org/dc/elements/1.0/'>
|
||||
<s:Image about="ct1n0g04.png">
|
||||
<dc:type>image/png</dc:type>
|
||||
<s:Title>PngSuite</s:Title>
|
||||
<s:Author>Willem A.J. van Schaik
|
||||
(gwillem@ntuvax.ntu.ac.sg)</s:Author>
|
||||
<s:Copyright>Copyright Willem van Schaik, Singapore 1995</s:Copyright>
|
||||
<s:Description>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.</s:Description>
|
||||
<s:Software>Created on a NeXTstation color using "pnmtopng".</s:Software>
|
||||
<s:Disclaimer>Freeware.</s:Disclaimer>
|
||||
</s:Image>
|
||||
</rdf:RDF>
|
||||
|
||||
<!--Created by pngmeta V1.10 -->
|
||||
Reference in New Issue
Block a user