summaryrefslogtreecommitdiff
path: root/tiff/test
diff options
context:
space:
mode:
Diffstat (limited to 'tiff/test')
-rwxr-xr-xtiff/test/Makefile.am305
-rwxr-xr-xtiff/test/Makefile.in1907
-rwxr-xr-xtiff/test/ascii_tag.c177
-rwxr-xr-xtiff/test/bmp2tiff_palette.sh7
-rwxr-xr-xtiff/test/bmp2tiff_rgb.sh7
-rwxr-xr-xtiff/test/check_tag.c91
-rwxr-xr-xtiff/test/common.sh129
-rwxr-xr-xtiff/test/custom_dir.c247
-rwxr-xr-xtiff/test/gif2tiff.sh7
-rwxr-xr-xtiff/test/long_tag.c156
-rwxr-xr-xtiff/test/ppm2tiff_pbm.sh7
-rwxr-xr-xtiff/test/ppm2tiff_pgm.sh7
-rwxr-xr-xtiff/test/ppm2tiff_ppm.sh7
-rwxr-xr-xtiff/test/raw_decode.c274
-rwxr-xr-xtiff/test/rewrite_tag.c346
-rwxr-xr-xtiff/test/short_tag.c205
-rwxr-xr-xtiff/test/strip.c290
-rwxr-xr-xtiff/test/strip_rw.c157
-rwxr-xr-xtiff/test/test_arrays.c829
-rwxr-xr-xtiff/test/test_arrays.h63
-rwxr-xr-xtiff/test/tiff2pdf.sh6
-rwxr-xr-xtiff/test/tiff2ps-EPS1.sh6
-rwxr-xr-xtiff/test/tiff2ps-PS1.sh6
-rwxr-xr-xtiff/test/tiff2ps-PS2.sh6
-rwxr-xr-xtiff/test/tiff2ps-PS3.sh6
-rwxr-xr-xtiff/test/tiff2rgba-logluv-3c-16b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-minisblack-1c-16b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-minisblack-1c-8b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh7
-rwxr-xr-xtiff/test/tiff2rgba-miniswhite-1c-1b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-palette-1c-1b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-palette-1c-4b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-palette-1c-8b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-quad-tile.jpg.sh7
-rwxr-xr-xtiff/test/tiff2rgba-rgb-3c-16b.sh7
-rwxr-xr-xtiff/test/tiff2rgba-rgb-3c-8b.sh7
-rwxr-xr-xtiff/test/tiffcp-g3-1d-fill.sh7
-rwxr-xr-xtiff/test/tiffcp-g3-1d.sh6
-rwxr-xr-xtiff/test/tiffcp-g3-2d-fill.sh7
-rwxr-xr-xtiff/test/tiffcp-g3-2d.sh6
-rwxr-xr-xtiff/test/tiffcp-g3.sh6
-rwxr-xr-xtiff/test/tiffcp-g4.sh6
-rwxr-xr-xtiff/test/tiffcp-logluv.sh7
-rwxr-xr-xtiff/test/tiffcp-split-join.sh16
-rwxr-xr-xtiff/test/tiffcp-split.sh13
-rwxr-xr-xtiff/test/tiffcp-thumbnail.sh10
-rwxr-xr-xtiff/test/tiffcrop-R90-logluv-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-minisblack-1c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-minisblack-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-miniswhite-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-palette-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-palette-1c-4b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-palette-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-rgb-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-R90-rgb-3c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-palette-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-palette-1c-4b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-palette-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-logluv-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-minisblack-1c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-minisblack-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-miniswhite-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-palette-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-palette-1c-4b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-palette-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-rgb-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extract-rgb-3c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-logluv-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-palette-1c-1b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-palette-1c-4b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-palette-1c-8b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-rgb-3c-16b.sh7
-rwxr-xr-xtiff/test/tiffcrop-extractz14-rgb-3c-8b.sh7
-rwxr-xr-xtiff/test/tiffdump.sh6
-rwxr-xr-xtiff/test/tiffinfo.sh6
-rwxr-xr-xtiff/test/tifftest.h42
89 files changed, 5743 insertions, 0 deletions
diff --git a/tiff/test/Makefile.am b/tiff/test/Makefile.am
new file mode 100755
index 0000000..da8e37b
--- /dev/null
+++ b/tiff/test/Makefile.am
@@ -0,0 +1,305 @@
+# Tag Image File Format (TIFF) Software
+#
+# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+# Process this file with automake to produce Makefile.in.
+
+AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
+
+LIBTIFF = $(top_builddir)/libtiff/libtiff.la
+
+# Environment parameters to be used during tests
+TESTS_ENVIRONMENT = \
+ MAKE="$(MAKE)" \
+ MAKEFLAGS="$(MAKEFLAGS)" \
+ MEMCHECK="$(MEMCHECK)"
+
+EXTRA_DIST = \
+ $(TESTSCRIPTS) \
+ $(IMAGES_EXTRA_DIST) \
+ common.sh
+
+# All of the tests to execute via 'make check'
+TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
+
+# Tests which are expected to fail
+XFAIL_TESTS =
+
+# Extra files which should be cleaned by 'make clean'
+CLEANFILES = test_packbits.tif o-*
+
+# Executable programs which need to be built in order to support tests
+check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite raw_decode custom_dir
+
+# Test scripts to execute
+TESTSCRIPTS = \
+ bmp2tiff_palette.sh \
+ bmp2tiff_rgb.sh \
+ gif2tiff.sh \
+ ppm2tiff_pbm.sh \
+ ppm2tiff_pgm.sh \
+ ppm2tiff_ppm.sh \
+ tiffcp-g3.sh \
+ tiffcp-g3-1d.sh \
+ tiffcp-g3-1d-fill.sh \
+ tiffcp-g3-2d.sh \
+ tiffcp-g3-2d-fill.sh \
+ tiffcp-g4.sh \
+ tiffcp-logluv.sh \
+ tiffcp-thumbnail.sh \
+ tiffdump.sh \
+ tiffinfo.sh \
+ tiffcp-split.sh \
+ tiffcp-split-join.sh \
+ tiff2ps-PS1.sh \
+ tiff2ps-PS2.sh \
+ tiff2ps-PS3.sh \
+ tiff2ps-EPS1.sh \
+ tiff2pdf.sh \
+ tiffcrop-doubleflip-logluv-3c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-8b.sh \
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
+ tiffcrop-doubleflip-miniswhite-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-4b.sh \
+ tiffcrop-doubleflip-palette-1c-8b.sh \
+ tiffcrop-doubleflip-rgb-3c-16b.sh \
+ tiffcrop-doubleflip-rgb-3c-8b.sh \
+ tiffcrop-extract-logluv-3c-16b.sh \
+ tiffcrop-extract-minisblack-1c-16b.sh \
+ tiffcrop-extract-minisblack-1c-8b.sh \
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extract-miniswhite-1c-1b.sh \
+ tiffcrop-extract-palette-1c-1b.sh \
+ tiffcrop-extract-palette-1c-4b.sh \
+ tiffcrop-extract-palette-1c-8b.sh \
+ tiffcrop-extract-rgb-3c-16b.sh \
+ tiffcrop-extract-rgb-3c-8b.sh \
+ tiffcrop-extractz14-logluv-3c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-8b.sh \
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extractz14-miniswhite-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-4b.sh \
+ tiffcrop-extractz14-palette-1c-8b.sh \
+ tiffcrop-extractz14-rgb-3c-16b.sh \
+ tiffcrop-extractz14-rgb-3c-8b.sh \
+ tiffcrop-R90-logluv-3c-16b.sh \
+ tiffcrop-R90-minisblack-1c-16b.sh \
+ tiffcrop-R90-minisblack-1c-8b.sh \
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh \
+ tiffcrop-R90-miniswhite-1c-1b.sh \
+ tiffcrop-R90-palette-1c-1b.sh \
+ tiffcrop-R90-palette-1c-4b.sh \
+ tiffcrop-R90-palette-1c-8b.sh \
+ tiffcrop-R90-rgb-3c-16b.sh \
+ tiffcrop-R90-rgb-3c-8b.sh \
+ tiff2rgba-logluv-3c-16b.sh \
+ tiff2rgba-minisblack-1c-16b.sh \
+ tiff2rgba-minisblack-1c-8b.sh \
+ tiff2rgba-minisblack-2c-8b-alpha.sh \
+ tiff2rgba-miniswhite-1c-1b.sh \
+ tiff2rgba-palette-1c-1b.sh \
+ tiff2rgba-palette-1c-4b.sh \
+ tiff2rgba-palette-1c-8b.sh \
+ tiff2rgba-rgb-3c-16b.sh \
+ tiff2rgba-rgb-3c-8b.sh \
+ tiff2rgba-quad-tile.jpg.sh
+
+# This list should contain all of the TIFF files in the 'images'
+# subdirectory which are intended to be used as input images for
+# tests. All of these files should use the extension ".tiff".
+TIFFIMAGES = \
+ images/logluv-3c-16b.tiff \
+ images/minisblack-1c-16b.tiff \
+ images/minisblack-1c-8b.tiff \
+ images/minisblack-2c-8b-alpha.tiff \
+ images/miniswhite-1c-1b.tiff \
+ images/palette-1c-1b.tiff \
+ images/palette-1c-4b.tiff \
+ images/palette-1c-8b.tiff \
+ images/rgb-3c-16b.tiff \
+ images/rgb-3c-8b.tiff \
+ images/quad-tile.jpg.tiff
+
+BMPIMAGES = \
+ images/palette-1c-8b.bmp \
+ images/rgb-3c-8b.bmp
+
+GIFIMAGES = \
+ images/palette-1c-8b.gif
+
+PNMIMAGES = \
+ images/minisblack-1c-8b.pgm \
+ images/miniswhite-1c-1b.pbm \
+ images/rgb-3c-8b.ppm
+
+# This list should include all of the files in the 'images'
+# subdirectory which are intended to be distributed. This may include
+# files which are not currently used by the tests.
+IMAGES_EXTRA_DIST = \
+ images/README.txt \
+ $(BMPIMAGES) \
+ $(GIFIMAGES) \
+ $(PNMIMAGES) \
+ $(TIFFIMAGES)
+
+noinst_HEADERS = tifftest.h
+
+ascii_tag_SOURCES = ascii_tag.c
+ascii_tag_LDADD = $(LIBTIFF)
+long_tag_SOURCES = long_tag.c check_tag.c
+long_tag_LDADD = $(LIBTIFF)
+short_tag_SOURCES = short_tag.c check_tag.c
+short_tag_LDADD = $(LIBTIFF)
+strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
+strip_rw_LDADD = $(LIBTIFF)
+rewrite_SOURCES = rewrite_tag.c
+rewrite_LDADD = $(LIBTIFF)
+raw_decode_SOURCES = raw_decode.c
+raw_decode_LDADD = $(LIBTIFF)
+custom_dir_SOURCES = custom_dir.c
+custom_dir_LDADD = $(LIBTIFF)
+
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
+
+# memcheck: valgrind's memory access checker.
+#
+# The suppressions which come with valgrind are sometimes insufficient
+# to handle certain system library aspects which may be reported and
+# which are unrelated to libtiff. When first starting with a new
+# system (or after a major system update), it is good to execute the
+# test suite (known to already be passing!) like 'make memcheck
+# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind
+# suppression entries in the test log. Make sure that none of the
+# suppressions are due to libtiff itself. Tell valgrind about the
+# suppressions by creating a .valgrindrc file with content like:
+# --memcheck:suppressions=mysupp.supp
+memcheck:
+ $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
+ --error-exitcode=2 --track-origins=yes --num-callers=12 \
+ --quiet $(VALGRIND_EXTRA_OPTS)' check
+
+# ptrcheck: valgrind's experimental pointer checking tool.
+ptrcheck:
+ $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
+
+generate-tiff2rgba-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiff2rgba-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test rotations
+generate-tiffcrop-R90-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test flip (mirror)
+generate-tiffcrop-doubleflip-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test extracting a section 100 pixels wide and 100 pixels high
+generate-tiffcrop-extract-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test extracting the first and fourth quarters from the left side.
+generate-tiffcrop-extractz14-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+generate-tiffcrop-tests: \
+ generate-tiffcrop-R90-tests \
+ generate-tiffcrop-doubleflip-tests \
+ generate-tiffcrop-extract-tests \
+ generate-tiffcrop-extractz14-tests
+
+generate-tests: \
+ generate-tiff2rgba-tests \
+ generate-tiffcrop-tests
diff --git a/tiff/test/Makefile.in b/tiff/test/Makefile.in
new file mode 100755
index 0000000..d187f15
--- /dev/null
+++ b/tiff/test/Makefile.in
@@ -0,0 +1,1907 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Tag Image File Format (TIFF) Software
+#
+# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+#
+# Permission to use, copy, modify, distribute, and sell this software and
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+#
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+#
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+
+# Process this file with automake to produce Makefile.in.
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+XFAIL_TESTS =
+check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \
+ short_tag$(EXEEXT) strip_rw$(EXEEXT) rewrite$(EXEEXT) \
+ raw_decode$(EXEEXT) custom_dir$(EXEEXT)
+subdir = test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
+ $(top_builddir)/libtiff/tiffconf.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT)
+ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS)
+ascii_tag_DEPENDENCIES = $(LIBTIFF)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+am_custom_dir_OBJECTS = custom_dir.$(OBJEXT)
+custom_dir_OBJECTS = $(am_custom_dir_OBJECTS)
+custom_dir_DEPENDENCIES = $(LIBTIFF)
+am_long_tag_OBJECTS = long_tag.$(OBJEXT) check_tag.$(OBJEXT)
+long_tag_OBJECTS = $(am_long_tag_OBJECTS)
+long_tag_DEPENDENCIES = $(LIBTIFF)
+am_raw_decode_OBJECTS = raw_decode.$(OBJEXT)
+raw_decode_OBJECTS = $(am_raw_decode_OBJECTS)
+raw_decode_DEPENDENCIES = $(LIBTIFF)
+am_rewrite_OBJECTS = rewrite_tag.$(OBJEXT)
+rewrite_OBJECTS = $(am_rewrite_OBJECTS)
+rewrite_DEPENDENCIES = $(LIBTIFF)
+am_short_tag_OBJECTS = short_tag.$(OBJEXT) check_tag.$(OBJEXT)
+short_tag_OBJECTS = $(am_short_tag_OBJECTS)
+short_tag_DEPENDENCIES = $(LIBTIFF)
+am_strip_rw_OBJECTS = strip_rw.$(OBJEXT) strip.$(OBJEXT) \
+ test_arrays.$(OBJEXT)
+strip_rw_OBJECTS = $(am_strip_rw_OBJECTS)
+strip_rw_DEPENDENCIES = $(LIBTIFF)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \
+ $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \
+ $(short_tag_SOURCES) $(strip_rw_SOURCES)
+DIST_SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \
+ $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \
+ $(short_tag_SOURCES) $(strip_rw_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/test-driver
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GLUT_CFLAGS = @GLUT_CFLAGS@
+GLUT_LIBS = @GLUT_LIBS@
+GLU_CFLAGS = @GLU_CFLAGS@
+GLU_LIBS = @GLU_LIBS@
+GL_CFLAGS = @GL_CFLAGS@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDIR = @LIBDIR@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTIFF_ALPHA_VERSION = @LIBTIFF_ALPHA_VERSION@
+LIBTIFF_DOCDIR = @LIBTIFF_DOCDIR@
+LIBTIFF_MAJOR_VERSION = @LIBTIFF_MAJOR_VERSION@
+LIBTIFF_MICRO_VERSION = @LIBTIFF_MICRO_VERSION@
+LIBTIFF_MINOR_VERSION = @LIBTIFF_MINOR_VERSION@
+LIBTIFF_RELEASE_DATE = @LIBTIFF_RELEASE_DATE@
+LIBTIFF_VERSION = @LIBTIFF_VERSION@
+LIBTIFF_VERSION_INFO = @LIBTIFF_VERSION_INFO@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+XMKMF = @XMKMF@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+tiff_libs_private = @tiff_libs_private@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
+LIBTIFF = $(top_builddir)/libtiff/libtiff.la
+
+# Environment parameters to be used during tests
+TESTS_ENVIRONMENT = \
+ MAKE="$(MAKE)" \
+ MAKEFLAGS="$(MAKEFLAGS)" \
+ MEMCHECK="$(MEMCHECK)"
+
+EXTRA_DIST = \
+ $(TESTSCRIPTS) \
+ $(IMAGES_EXTRA_DIST) \
+ common.sh
+
+
+# All of the tests to execute via 'make check'
+TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
+
+# Extra files which should be cleaned by 'make clean'
+CLEANFILES = test_packbits.tif o-*
+
+# Test scripts to execute
+TESTSCRIPTS = \
+ bmp2tiff_palette.sh \
+ bmp2tiff_rgb.sh \
+ gif2tiff.sh \
+ ppm2tiff_pbm.sh \
+ ppm2tiff_pgm.sh \
+ ppm2tiff_ppm.sh \
+ tiffcp-g3.sh \
+ tiffcp-g3-1d.sh \
+ tiffcp-g3-1d-fill.sh \
+ tiffcp-g3-2d.sh \
+ tiffcp-g3-2d-fill.sh \
+ tiffcp-g4.sh \
+ tiffcp-logluv.sh \
+ tiffcp-thumbnail.sh \
+ tiffdump.sh \
+ tiffinfo.sh \
+ tiffcp-split.sh \
+ tiffcp-split-join.sh \
+ tiff2ps-PS1.sh \
+ tiff2ps-PS2.sh \
+ tiff2ps-PS3.sh \
+ tiff2ps-EPS1.sh \
+ tiff2pdf.sh \
+ tiffcrop-doubleflip-logluv-3c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-8b.sh \
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
+ tiffcrop-doubleflip-miniswhite-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-4b.sh \
+ tiffcrop-doubleflip-palette-1c-8b.sh \
+ tiffcrop-doubleflip-rgb-3c-16b.sh \
+ tiffcrop-doubleflip-rgb-3c-8b.sh \
+ tiffcrop-extract-logluv-3c-16b.sh \
+ tiffcrop-extract-minisblack-1c-16b.sh \
+ tiffcrop-extract-minisblack-1c-8b.sh \
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extract-miniswhite-1c-1b.sh \
+ tiffcrop-extract-palette-1c-1b.sh \
+ tiffcrop-extract-palette-1c-4b.sh \
+ tiffcrop-extract-palette-1c-8b.sh \
+ tiffcrop-extract-rgb-3c-16b.sh \
+ tiffcrop-extract-rgb-3c-8b.sh \
+ tiffcrop-extractz14-logluv-3c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-8b.sh \
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extractz14-miniswhite-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-4b.sh \
+ tiffcrop-extractz14-palette-1c-8b.sh \
+ tiffcrop-extractz14-rgb-3c-16b.sh \
+ tiffcrop-extractz14-rgb-3c-8b.sh \
+ tiffcrop-R90-logluv-3c-16b.sh \
+ tiffcrop-R90-minisblack-1c-16b.sh \
+ tiffcrop-R90-minisblack-1c-8b.sh \
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh \
+ tiffcrop-R90-miniswhite-1c-1b.sh \
+ tiffcrop-R90-palette-1c-1b.sh \
+ tiffcrop-R90-palette-1c-4b.sh \
+ tiffcrop-R90-palette-1c-8b.sh \
+ tiffcrop-R90-rgb-3c-16b.sh \
+ tiffcrop-R90-rgb-3c-8b.sh \
+ tiff2rgba-logluv-3c-16b.sh \
+ tiff2rgba-minisblack-1c-16b.sh \
+ tiff2rgba-minisblack-1c-8b.sh \
+ tiff2rgba-minisblack-2c-8b-alpha.sh \
+ tiff2rgba-miniswhite-1c-1b.sh \
+ tiff2rgba-palette-1c-1b.sh \
+ tiff2rgba-palette-1c-4b.sh \
+ tiff2rgba-palette-1c-8b.sh \
+ tiff2rgba-rgb-3c-16b.sh \
+ tiff2rgba-rgb-3c-8b.sh \
+ tiff2rgba-quad-tile.jpg.sh
+
+
+# This list should contain all of the TIFF files in the 'images'
+# subdirectory which are intended to be used as input images for
+# tests. All of these files should use the extension ".tiff".
+TIFFIMAGES = \
+ images/logluv-3c-16b.tiff \
+ images/minisblack-1c-16b.tiff \
+ images/minisblack-1c-8b.tiff \
+ images/minisblack-2c-8b-alpha.tiff \
+ images/miniswhite-1c-1b.tiff \
+ images/palette-1c-1b.tiff \
+ images/palette-1c-4b.tiff \
+ images/palette-1c-8b.tiff \
+ images/rgb-3c-16b.tiff \
+ images/rgb-3c-8b.tiff \
+ images/quad-tile.jpg.tiff
+
+BMPIMAGES = \
+ images/palette-1c-8b.bmp \
+ images/rgb-3c-8b.bmp
+
+GIFIMAGES = \
+ images/palette-1c-8b.gif
+
+PNMIMAGES = \
+ images/minisblack-1c-8b.pgm \
+ images/miniswhite-1c-1b.pbm \
+ images/rgb-3c-8b.ppm
+
+
+# This list should include all of the files in the 'images'
+# subdirectory which are intended to be distributed. This may include
+# files which are not currently used by the tests.
+IMAGES_EXTRA_DIST = \
+ images/README.txt \
+ $(BMPIMAGES) \
+ $(GIFIMAGES) \
+ $(PNMIMAGES) \
+ $(TIFFIMAGES)
+
+noinst_HEADERS = tifftest.h
+ascii_tag_SOURCES = ascii_tag.c
+ascii_tag_LDADD = $(LIBTIFF)
+long_tag_SOURCES = long_tag.c check_tag.c
+long_tag_LDADD = $(LIBTIFF)
+short_tag_SOURCES = short_tag.c check_tag.c
+short_tag_LDADD = $(LIBTIFF)
+strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
+strip_rw_LDADD = $(LIBTIFF)
+rewrite_SOURCES = rewrite_tag.c
+rewrite_LDADD = $(LIBTIFF)
+raw_decode_SOURCES = raw_decode.c
+raw_decode_LDADD = $(LIBTIFF)
+custom_dir_SOURCES = custom_dir.c
+custom_dir_LDADD = $(LIBTIFF)
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign test/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+ascii_tag$(EXEEXT): $(ascii_tag_OBJECTS) $(ascii_tag_DEPENDENCIES) $(EXTRA_ascii_tag_DEPENDENCIES)
+ @rm -f ascii_tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ascii_tag_OBJECTS) $(ascii_tag_LDADD) $(LIBS)
+
+custom_dir$(EXEEXT): $(custom_dir_OBJECTS) $(custom_dir_DEPENDENCIES) $(EXTRA_custom_dir_DEPENDENCIES)
+ @rm -f custom_dir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(custom_dir_OBJECTS) $(custom_dir_LDADD) $(LIBS)
+
+long_tag$(EXEEXT): $(long_tag_OBJECTS) $(long_tag_DEPENDENCIES) $(EXTRA_long_tag_DEPENDENCIES)
+ @rm -f long_tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(long_tag_OBJECTS) $(long_tag_LDADD) $(LIBS)
+
+raw_decode$(EXEEXT): $(raw_decode_OBJECTS) $(raw_decode_DEPENDENCIES) $(EXTRA_raw_decode_DEPENDENCIES)
+ @rm -f raw_decode$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(raw_decode_OBJECTS) $(raw_decode_LDADD) $(LIBS)
+
+rewrite$(EXEEXT): $(rewrite_OBJECTS) $(rewrite_DEPENDENCIES) $(EXTRA_rewrite_DEPENDENCIES)
+ @rm -f rewrite$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(rewrite_OBJECTS) $(rewrite_LDADD) $(LIBS)
+
+short_tag$(EXEEXT): $(short_tag_OBJECTS) $(short_tag_DEPENDENCIES) $(EXTRA_short_tag_DEPENDENCIES)
+ @rm -f short_tag$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(short_tag_OBJECTS) $(short_tag_LDADD) $(LIBS)
+
+strip_rw$(EXEEXT): $(strip_rw_OBJECTS) $(strip_rw_DEPENDENCIES) $(EXTRA_strip_rw_DEPENDENCIES)
+ @rm -f strip_rw$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(strip_rw_OBJECTS) $(strip_rw_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_decode.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip_rw.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_arrays.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
+ascii_tag.log: ascii_tag$(EXEEXT)
+ @p='ascii_tag$(EXEEXT)'; \
+ b='ascii_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+long_tag.log: long_tag$(EXEEXT)
+ @p='long_tag$(EXEEXT)'; \
+ b='long_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+short_tag.log: short_tag$(EXEEXT)
+ @p='short_tag$(EXEEXT)'; \
+ b='short_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+strip_rw.log: strip_rw$(EXEEXT)
+ @p='strip_rw$(EXEEXT)'; \
+ b='strip_rw'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+rewrite.log: rewrite$(EXEEXT)
+ @p='rewrite$(EXEEXT)'; \
+ b='rewrite'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+raw_decode.log: raw_decode$(EXEEXT)
+ @p='raw_decode$(EXEEXT)'; \
+ b='raw_decode'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+custom_dir.log: custom_dir$(EXEEXT)
+ @p='custom_dir$(EXEEXT)'; \
+ b='custom_dir'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+bmp2tiff_palette.sh.log: bmp2tiff_palette.sh
+ @p='bmp2tiff_palette.sh'; \
+ b='bmp2tiff_palette.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+bmp2tiff_rgb.sh.log: bmp2tiff_rgb.sh
+ @p='bmp2tiff_rgb.sh'; \
+ b='bmp2tiff_rgb.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+gif2tiff.sh.log: gif2tiff.sh
+ @p='gif2tiff.sh'; \
+ b='gif2tiff.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ppm2tiff_pbm.sh.log: ppm2tiff_pbm.sh
+ @p='ppm2tiff_pbm.sh'; \
+ b='ppm2tiff_pbm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ppm2tiff_pgm.sh.log: ppm2tiff_pgm.sh
+ @p='ppm2tiff_pgm.sh'; \
+ b='ppm2tiff_pgm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+ppm2tiff_ppm.sh.log: ppm2tiff_ppm.sh
+ @p='ppm2tiff_ppm.sh'; \
+ b='ppm2tiff_ppm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g3.sh.log: tiffcp-g3.sh
+ @p='tiffcp-g3.sh'; \
+ b='tiffcp-g3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g3-1d.sh.log: tiffcp-g3-1d.sh
+ @p='tiffcp-g3-1d.sh'; \
+ b='tiffcp-g3-1d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g3-1d-fill.sh.log: tiffcp-g3-1d-fill.sh
+ @p='tiffcp-g3-1d-fill.sh'; \
+ b='tiffcp-g3-1d-fill.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g3-2d.sh.log: tiffcp-g3-2d.sh
+ @p='tiffcp-g3-2d.sh'; \
+ b='tiffcp-g3-2d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g3-2d-fill.sh.log: tiffcp-g3-2d-fill.sh
+ @p='tiffcp-g3-2d-fill.sh'; \
+ b='tiffcp-g3-2d-fill.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-g4.sh.log: tiffcp-g4.sh
+ @p='tiffcp-g4.sh'; \
+ b='tiffcp-g4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-logluv.sh.log: tiffcp-logluv.sh
+ @p='tiffcp-logluv.sh'; \
+ b='tiffcp-logluv.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-thumbnail.sh.log: tiffcp-thumbnail.sh
+ @p='tiffcp-thumbnail.sh'; \
+ b='tiffcp-thumbnail.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffdump.sh.log: tiffdump.sh
+ @p='tiffdump.sh'; \
+ b='tiffdump.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffinfo.sh.log: tiffinfo.sh
+ @p='tiffinfo.sh'; \
+ b='tiffinfo.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-split.sh.log: tiffcp-split.sh
+ @p='tiffcp-split.sh'; \
+ b='tiffcp-split.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcp-split-join.sh.log: tiffcp-split-join.sh
+ @p='tiffcp-split-join.sh'; \
+ b='tiffcp-split-join.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2ps-PS1.sh.log: tiff2ps-PS1.sh
+ @p='tiff2ps-PS1.sh'; \
+ b='tiff2ps-PS1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2ps-PS2.sh.log: tiff2ps-PS2.sh
+ @p='tiff2ps-PS2.sh'; \
+ b='tiff2ps-PS2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2ps-PS3.sh.log: tiff2ps-PS3.sh
+ @p='tiff2ps-PS3.sh'; \
+ b='tiff2ps-PS3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2ps-EPS1.sh.log: tiff2ps-EPS1.sh
+ @p='tiff2ps-EPS1.sh'; \
+ b='tiff2ps-EPS1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2pdf.sh.log: tiff2pdf.sh
+ @p='tiff2pdf.sh'; \
+ b='tiff2pdf.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-logluv-3c-16b.sh.log: tiffcrop-doubleflip-logluv-3c-16b.sh
+ @p='tiffcrop-doubleflip-logluv-3c-16b.sh'; \
+ b='tiffcrop-doubleflip-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-minisblack-1c-16b.sh.log: tiffcrop-doubleflip-minisblack-1c-16b.sh
+ @p='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \
+ b='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-minisblack-1c-8b.sh.log: tiffcrop-doubleflip-minisblack-1c-8b.sh
+ @p='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \
+ b='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh.log: tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh
+ @p='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-miniswhite-1c-1b.sh.log: tiffcrop-doubleflip-miniswhite-1c-1b.sh
+ @p='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-palette-1c-1b.sh.log: tiffcrop-doubleflip-palette-1c-1b.sh
+ @p='tiffcrop-doubleflip-palette-1c-1b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-palette-1c-4b.sh.log: tiffcrop-doubleflip-palette-1c-4b.sh
+ @p='tiffcrop-doubleflip-palette-1c-4b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-palette-1c-8b.sh.log: tiffcrop-doubleflip-palette-1c-8b.sh
+ @p='tiffcrop-doubleflip-palette-1c-8b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-rgb-3c-16b.sh.log: tiffcrop-doubleflip-rgb-3c-16b.sh
+ @p='tiffcrop-doubleflip-rgb-3c-16b.sh'; \
+ b='tiffcrop-doubleflip-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-doubleflip-rgb-3c-8b.sh.log: tiffcrop-doubleflip-rgb-3c-8b.sh
+ @p='tiffcrop-doubleflip-rgb-3c-8b.sh'; \
+ b='tiffcrop-doubleflip-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-logluv-3c-16b.sh.log: tiffcrop-extract-logluv-3c-16b.sh
+ @p='tiffcrop-extract-logluv-3c-16b.sh'; \
+ b='tiffcrop-extract-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-minisblack-1c-16b.sh.log: tiffcrop-extract-minisblack-1c-16b.sh
+ @p='tiffcrop-extract-minisblack-1c-16b.sh'; \
+ b='tiffcrop-extract-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-minisblack-1c-8b.sh.log: tiffcrop-extract-minisblack-1c-8b.sh
+ @p='tiffcrop-extract-minisblack-1c-8b.sh'; \
+ b='tiffcrop-extract-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-minisblack-2c-8b-alpha.sh.log: tiffcrop-extract-minisblack-2c-8b-alpha.sh
+ @p='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-miniswhite-1c-1b.sh.log: tiffcrop-extract-miniswhite-1c-1b.sh
+ @p='tiffcrop-extract-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-extract-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-palette-1c-1b.sh.log: tiffcrop-extract-palette-1c-1b.sh
+ @p='tiffcrop-extract-palette-1c-1b.sh'; \
+ b='tiffcrop-extract-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-palette-1c-4b.sh.log: tiffcrop-extract-palette-1c-4b.sh
+ @p='tiffcrop-extract-palette-1c-4b.sh'; \
+ b='tiffcrop-extract-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-palette-1c-8b.sh.log: tiffcrop-extract-palette-1c-8b.sh
+ @p='tiffcrop-extract-palette-1c-8b.sh'; \
+ b='tiffcrop-extract-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-rgb-3c-16b.sh.log: tiffcrop-extract-rgb-3c-16b.sh
+ @p='tiffcrop-extract-rgb-3c-16b.sh'; \
+ b='tiffcrop-extract-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extract-rgb-3c-8b.sh.log: tiffcrop-extract-rgb-3c-8b.sh
+ @p='tiffcrop-extract-rgb-3c-8b.sh'; \
+ b='tiffcrop-extract-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-logluv-3c-16b.sh.log: tiffcrop-extractz14-logluv-3c-16b.sh
+ @p='tiffcrop-extractz14-logluv-3c-16b.sh'; \
+ b='tiffcrop-extractz14-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-minisblack-1c-16b.sh.log: tiffcrop-extractz14-minisblack-1c-16b.sh
+ @p='tiffcrop-extractz14-minisblack-1c-16b.sh'; \
+ b='tiffcrop-extractz14-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-minisblack-1c-8b.sh.log: tiffcrop-extractz14-minisblack-1c-8b.sh
+ @p='tiffcrop-extractz14-minisblack-1c-8b.sh'; \
+ b='tiffcrop-extractz14-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-minisblack-2c-8b-alpha.sh.log: tiffcrop-extractz14-minisblack-2c-8b-alpha.sh
+ @p='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-miniswhite-1c-1b.sh.log: tiffcrop-extractz14-miniswhite-1c-1b.sh
+ @p='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-palette-1c-1b.sh.log: tiffcrop-extractz14-palette-1c-1b.sh
+ @p='tiffcrop-extractz14-palette-1c-1b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-palette-1c-4b.sh.log: tiffcrop-extractz14-palette-1c-4b.sh
+ @p='tiffcrop-extractz14-palette-1c-4b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-palette-1c-8b.sh.log: tiffcrop-extractz14-palette-1c-8b.sh
+ @p='tiffcrop-extractz14-palette-1c-8b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-rgb-3c-16b.sh.log: tiffcrop-extractz14-rgb-3c-16b.sh
+ @p='tiffcrop-extractz14-rgb-3c-16b.sh'; \
+ b='tiffcrop-extractz14-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-extractz14-rgb-3c-8b.sh.log: tiffcrop-extractz14-rgb-3c-8b.sh
+ @p='tiffcrop-extractz14-rgb-3c-8b.sh'; \
+ b='tiffcrop-extractz14-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-logluv-3c-16b.sh.log: tiffcrop-R90-logluv-3c-16b.sh
+ @p='tiffcrop-R90-logluv-3c-16b.sh'; \
+ b='tiffcrop-R90-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-minisblack-1c-16b.sh.log: tiffcrop-R90-minisblack-1c-16b.sh
+ @p='tiffcrop-R90-minisblack-1c-16b.sh'; \
+ b='tiffcrop-R90-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-minisblack-1c-8b.sh.log: tiffcrop-R90-minisblack-1c-8b.sh
+ @p='tiffcrop-R90-minisblack-1c-8b.sh'; \
+ b='tiffcrop-R90-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-minisblack-2c-8b-alpha.sh.log: tiffcrop-R90-minisblack-2c-8b-alpha.sh
+ @p='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-miniswhite-1c-1b.sh.log: tiffcrop-R90-miniswhite-1c-1b.sh
+ @p='tiffcrop-R90-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-R90-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-palette-1c-1b.sh.log: tiffcrop-R90-palette-1c-1b.sh
+ @p='tiffcrop-R90-palette-1c-1b.sh'; \
+ b='tiffcrop-R90-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-palette-1c-4b.sh.log: tiffcrop-R90-palette-1c-4b.sh
+ @p='tiffcrop-R90-palette-1c-4b.sh'; \
+ b='tiffcrop-R90-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-palette-1c-8b.sh.log: tiffcrop-R90-palette-1c-8b.sh
+ @p='tiffcrop-R90-palette-1c-8b.sh'; \
+ b='tiffcrop-R90-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-rgb-3c-16b.sh.log: tiffcrop-R90-rgb-3c-16b.sh
+ @p='tiffcrop-R90-rgb-3c-16b.sh'; \
+ b='tiffcrop-R90-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiffcrop-R90-rgb-3c-8b.sh.log: tiffcrop-R90-rgb-3c-8b.sh
+ @p='tiffcrop-R90-rgb-3c-8b.sh'; \
+ b='tiffcrop-R90-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-logluv-3c-16b.sh.log: tiff2rgba-logluv-3c-16b.sh
+ @p='tiff2rgba-logluv-3c-16b.sh'; \
+ b='tiff2rgba-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-minisblack-1c-16b.sh.log: tiff2rgba-minisblack-1c-16b.sh
+ @p='tiff2rgba-minisblack-1c-16b.sh'; \
+ b='tiff2rgba-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-minisblack-1c-8b.sh.log: tiff2rgba-minisblack-1c-8b.sh
+ @p='tiff2rgba-minisblack-1c-8b.sh'; \
+ b='tiff2rgba-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-minisblack-2c-8b-alpha.sh.log: tiff2rgba-minisblack-2c-8b-alpha.sh
+ @p='tiff2rgba-minisblack-2c-8b-alpha.sh'; \
+ b='tiff2rgba-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-miniswhite-1c-1b.sh.log: tiff2rgba-miniswhite-1c-1b.sh
+ @p='tiff2rgba-miniswhite-1c-1b.sh'; \
+ b='tiff2rgba-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-palette-1c-1b.sh.log: tiff2rgba-palette-1c-1b.sh
+ @p='tiff2rgba-palette-1c-1b.sh'; \
+ b='tiff2rgba-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-palette-1c-4b.sh.log: tiff2rgba-palette-1c-4b.sh
+ @p='tiff2rgba-palette-1c-4b.sh'; \
+ b='tiff2rgba-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-palette-1c-8b.sh.log: tiff2rgba-palette-1c-8b.sh
+ @p='tiff2rgba-palette-1c-8b.sh'; \
+ b='tiff2rgba-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-rgb-3c-16b.sh.log: tiff2rgba-rgb-3c-16b.sh
+ @p='tiff2rgba-rgb-3c-16b.sh'; \
+ b='tiff2rgba-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-rgb-3c-8b.sh.log: tiff2rgba-rgb-3c-8b.sh
+ @p='tiff2rgba-rgb-3c-8b.sh'; \
+ b='tiff2rgba-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh
+ @p='tiff2rgba-quad-tile.jpg.sh'; \
+ b='tiff2rgba-quad-tile.jpg.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+.test.log:
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# memcheck: valgrind's memory access checker.
+#
+# The suppressions which come with valgrind are sometimes insufficient
+# to handle certain system library aspects which may be reported and
+# which are unrelated to libtiff. When first starting with a new
+# system (or after a major system update), it is good to execute the
+# test suite (known to already be passing!) like 'make memcheck
+# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind
+# suppression entries in the test log. Make sure that none of the
+# suppressions are due to libtiff itself. Tell valgrind about the
+# suppressions by creating a .valgrindrc file with content like:
+# --memcheck:suppressions=mysupp.supp
+memcheck:
+ $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
+ --error-exitcode=2 --track-origins=yes --num-callers=12 \
+ --quiet $(VALGRIND_EXTRA_OPTS)' check
+
+# ptrcheck: valgrind's experimental pointer checking tool.
+ptrcheck:
+ $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
+
+generate-tiff2rgba-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiff2rgba-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test rotations
+generate-tiffcrop-R90-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test flip (mirror)
+generate-tiffcrop-doubleflip-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test extracting a section 100 pixels wide and 100 pixels high
+generate-tiffcrop-extract-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+# Test extracting the first and fourth quarters from the left side.
+generate-tiffcrop-extractz14-tests:
+ for file in $(TIFFIMAGES) ; \
+ do \
+ base=`basename $$file .tiff` ; \
+ testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \
+ ( \
+ echo "#!/bin/sh" ; \
+ echo "# Generated file, master is Makefile.am" ; \
+ echo ". \$${srcdir:-.}/common.sh" ; \
+ echo "infile=\"\$$srcdir/$$file\"" ; \
+ echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \
+ echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \
+ echo "f_tiffinfo_validate \$$outfile" ; \
+ ) > $$testscript ; \
+ chmod +x $$testscript ; \
+ done
+
+generate-tiffcrop-tests: \
+ generate-tiffcrop-R90-tests \
+ generate-tiffcrop-doubleflip-tests \
+ generate-tiffcrop-extract-tests \
+ generate-tiffcrop-extractz14-tests
+
+generate-tests: \
+ generate-tiff2rgba-tests \
+ generate-tiffcrop-tests
+
+# 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:
diff --git a/tiff/test/ascii_tag.c b/tiff/test/ascii_tag.c
new file mode 100755
index 0000000..6337900
--- /dev/null
+++ b/tiff/test/ascii_tag.c
@@ -0,0 +1,177 @@
+/* $Id: ascii_tag.c,v 1.8 2013-12-17 14:41:57 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to test ASCII tags read/write functions.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+
+static const char filename[] = "ascii_test.tiff";
+
+static const struct {
+ ttag_t tag;
+ const char *value;
+} ascii_tags[] = {
+ { TIFFTAG_DOCUMENTNAME, "Test TIFF image" },
+ { TIFFTAG_IMAGEDESCRIPTION, "Temporary test image" },
+ { TIFFTAG_MAKE, "This is not scanned image" },
+ { TIFFTAG_MODEL, "No scanner" },
+ { TIFFTAG_PAGENAME, "Test page" },
+ { TIFFTAG_SOFTWARE, "Libtiff library" },
+ { TIFFTAG_DATETIME, "2004:09:10 16:09:00" },
+ { TIFFTAG_ARTIST, "Andrey V. Kiselev" },
+ { TIFFTAG_HOSTCOMPUTER, "Debian GNU/Linux (Sarge)" },
+ { TIFFTAG_TARGETPRINTER, "No printer" },
+ { TIFFTAG_COPYRIGHT, "Copyright (c) 2004, Andrey Kiselev" },
+ { TIFFTAG_FAXSUBADDRESS, "Fax subaddress" },
+ /* DGN tags */
+ { TIFFTAG_UNIQUECAMERAMODEL, "No camera" },
+ { TIFFTAG_CAMERASERIALNUMBER, "1234567890" }
+};
+#define NTAGS (sizeof (ascii_tags) / sizeof (ascii_tags[0]))
+
+static const char ink_names[] = "Red\0Green\0Blue";
+const int ink_names_size = 15;
+
+int
+main()
+{
+ TIFF *tif;
+ size_t i;
+ unsigned char buf[] = { 0, 127, 255 };
+ char *value;
+
+ /* Test whether we can write tags. */
+ tif = TIFFOpen(filename, "w");
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, 1)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, 1)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, sizeof(buf))) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ for (i = 0; i < NTAGS; i++) {
+ if (!TIFFSetField(tif, ascii_tags[i].tag,
+ ascii_tags[i].value)) {
+ fprintf(stderr, "Can't set tag %lu.\n",
+ (unsigned long)ascii_tags[i].tag);
+ goto failure;
+ }
+ }
+
+ /* InkNames tag has special form, so we handle it separately. */
+ if (!TIFFSetField(tif, TIFFTAG_NUMBEROFINKS, 3)) {
+ fprintf (stderr, "Can't set tag %d (NUMBEROFINKS).\n",
+ TIFFTAG_NUMBEROFINKS);
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_INKNAMES, ink_names_size, ink_names)) {
+ fprintf (stderr, "Can't set tag %d (INKNAMES).\n",
+ TIFFTAG_INKNAMES);
+ goto failure;
+ }
+
+ /* Write dummy pixel data. */
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values. */
+ tif = TIFFOpen(filename, "r");
+ if (!tif) {
+ fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ for (i = 0; i < NTAGS; i++) {
+ if (!TIFFGetField(tif, ascii_tags[i].tag, &value)
+ || strcmp(value, ascii_tags[i].value)) {
+ fprintf(stderr, "Can't get tag %lu.\n",
+ (unsigned long)ascii_tags[i].tag);
+ goto failure;
+ }
+ }
+
+ if (!TIFFGetField(tif, TIFFTAG_INKNAMES, &value)
+ || memcmp(value, ink_names, ink_names_size)) {
+ fprintf (stderr, "Can't get tag %d (INKNAMES).\n",
+ TIFFTAG_INKNAMES);
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+failure:
+ /*
+ * Something goes wrong; close file and return unsuccessful status.
+ * Do not remove the file for further manual investigation.
+ */
+ TIFFClose(tif);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/bmp2tiff_palette.sh b/tiff/test/bmp2tiff_palette.sh
new file mode 100755
index 0000000..1992623
--- /dev/null
+++ b/tiff/test/bmp2tiff_palette.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_PALETTE_1C_8B_BMP"
+outfile="o-bmp2tiff_palette.tiff"
+f_test_convert "$BMP2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/bmp2tiff_rgb.sh b/tiff/test/bmp2tiff_rgb.sh
new file mode 100755
index 0000000..2e940ce
--- /dev/null
+++ b/tiff/test/bmp2tiff_rgb.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_RGB_3C_8B_BMP"
+outfile="o-bmp2tiff_rgb.tiff"
+f_test_convert "$BMP2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/check_tag.c b/tiff/test/check_tag.c
new file mode 100755
index 0000000..6275ac0
--- /dev/null
+++ b/tiff/test/check_tag.c
@@ -0,0 +1,91 @@
+/* $Id: check_tag.c,v 1.3 2008-04-15 14:19:37 dron Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Helper testing routines.
+ */
+
+#include "tiffio.h"
+
+int
+CheckShortField(TIFF *tif, const ttag_t field, const uint16 value)
+{
+ uint16 tmp = 123;
+
+ if (!TIFFGetField(tif, field, &tmp)) {
+ fprintf (stderr, "Problem fetching tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+ if (tmp != value) {
+ fprintf (stderr, "Wrong SHORT value fetched for tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+CheckShortPairedField(TIFF *tif, const ttag_t field, const uint16 *values)
+{
+ uint16 tmp[2] = { 123, 456 };
+
+ if (!TIFFGetField(tif, field, tmp, tmp + 1)) {
+ fprintf (stderr, "Problem fetching tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+ if (tmp[0] != values[0] || tmp[1] != values[1]) {
+ fprintf (stderr, "Wrong SHORT PAIR fetched for tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+
+ return 0;
+}
+
+int
+CheckLongField(TIFF *tif, const ttag_t field, const uint32 value)
+{
+ uint32 tmp = 123;
+
+ if (!TIFFGetField(tif, field, &tmp)) {
+ fprintf (stderr, "Problem fetching tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+ if (tmp != value) {
+ fprintf (stderr, "Wrong LONG value fetched for tag %lu.\n",
+ (unsigned long) field);
+ return -1;
+ }
+
+ return 0;
+}
+
+
diff --git a/tiff/test/common.sh b/tiff/test/common.sh
new file mode 100755
index 0000000..643104b
--- /dev/null
+++ b/tiff/test/common.sh
@@ -0,0 +1,129 @@
+# Common code fragment for tests
+#
+srcdir=${srcdir:-.}
+BUILDDIR=`pwd`
+SRCDIR=`dirname $0`
+SRCDIR=`cd $SRCDIR && pwd`
+TOPSRCDIR=`cd $srcdir/.. && pwd`
+TOOLS=`cd ../tools && pwd`
+IMAGES="${SRCDIR}/images"
+
+# Aliases for built tools
+BMP2TIFF=${TOOLS}/bmp2tiff
+FAX2PS=${TOOLS}/fax2ps
+FAX2TIFF=${TOOLS}/fax2tiff
+GIF2TIFF=${TOOLS}/gif2tiff
+PAL2RGB=${TOOLS}/pal2rgb
+PPM2TIFF=${TOOLS}/ppm2tiff
+RAS2TIFF=${TOOLS}/ras2tiff
+RAW2TIFF=${TOOLS}/raw2tiff
+RGB2YCBCR=${TOOLS}/rgb2ycbcr
+THUMBNAIL=${TOOLS}/thumbnail
+TIFF2BW=${TOOLS}/tiff2bw
+TIFF2PDF=${TOOLS}/tiff2pdf
+TIFF2PS=${TOOLS}/tiff2ps
+TIFF2RGBA=${TOOLS}/tiff2rgba
+TIFFCMP=${TOOLS}/tiffcmp
+TIFFCP=${TOOLS}/tiffcp
+TIFFCROP=${TOOLS}/tiffcrop
+TIFFDITHER=${TOOLS}/tiffdither
+TIFFDUMP=${TOOLS}/tiffdump
+TIFFINFO=${TOOLS}/tiffinfo
+TIFFMEDIAN=${TOOLS}/tiffmedian
+TIFFSET=${TOOLS}/tiffset
+TIFFSPLIT=${TOOLS}/tiffsplit
+
+# Aliases for input test files
+IMG_MINISBLACK_1C_16B=${IMAGES}/minisblack-1c-16b.tiff
+IMG_MINISBLACK_1C_8B=${IMAGES}/minisblack-1c-8b.tiff
+IMG_MINISWHITE_1C_1B=${IMAGES}/miniswhite-1c-1b.tiff
+IMG_PALETTE_1C_1B=${IMAGES}/palette-1c-1b.tiff
+IMG_PALETTE_1C_4B=${IMAGES}/palette-1c-4b.tiff
+IMG_PALETTE_1C_8B=${IMAGES}/palette-1c-8b.tiff
+IMG_RGB_3C_16B=${IMAGES}/rgb-3c-16b.tiff
+IMG_RGB_3C_8B=${IMAGES}/rgb-3c-8b.tiff
+IMG_MINISBLACK_2C_8B_ALPHA=${IMAGES}/minisblack-2c-8b-alpha.tiff
+
+IMG_PALETTE_1C_8B_BMP=${IMAGES}/palette-1c-8b.bmp
+IMG_RGB_3C_8B_BMP=${IMAGES}/rgb-3c-8b.bmp
+
+IMG_PALETTE_1C_8B_GIF=${IMAGES}/palette-1c-8b.gif
+
+IMG_MINISWHITE_1C_1B_PBM=${IMAGES}/miniswhite-1c-1b.pbm
+IMG_MINISBLACK_1C_8B_PGM=${IMAGES}/minisblack-1c-8b.pgm
+IMG_RGB_3C_8B_PPM=${IMAGES}/rgb-3c-8b.ppm
+
+# All uncompressed image files
+IMG_UNCOMPRESSED="${IMG_MINISBLACK_1C_16B} ${IMG_MINISBLACK_1C_8B} ${IMG_MINISWHITE_1C_1B} ${IMG_PALETTE_1C_1B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_4B} ${IMG_PALETTE_1C_8B} ${IMG_RGB_3C_8B}"
+
+#
+# Test a simple convert-like command.
+#
+# f_test_convert command infile outfile
+f_test_convert ()
+{
+ command=$1
+ infile=$2
+ outfile=$3
+ rm -f $outfile
+ echo "$MEMCHECK $command $infile $outfile"
+ eval $MEMCHECK $command $infile $outfile
+ status=$?
+ if [ $status != 0 ] ; then
+ echo "Returned failed status $status!"
+ echo "Output (if any) is in \"${outfile}\"."
+ exit $status
+ fi
+}
+
+#
+# Test a simple command which sends output to stdout
+#
+# f_test_stdout command infile outfile
+f_test_stdout ()
+{
+ command=$1
+ infile=$2
+ outfile=$3
+ rm -f $outfile
+ echo "$MEMCHECK $command $infile > $outfile"
+ eval $MEMCHECK $command $infile > $outfile
+ status=$?
+ if [ $status != 0 ] ; then
+ echo "Returned failed status $status!"
+ echo "Output (if any) is in \"${outfile}\"."
+ exit $status
+ fi
+}
+
+#
+# Execute a simple command (e.g. tiffinfo) with one input file
+#
+# f_test_exec command infile
+f_test_reader ()
+{
+ command=$1
+ infile=$2
+ echo "$MEMCHECK $command $infile"
+ eval $MEMCHECK $command $infile
+ status=$?
+ if [ $status != 0 ] ; then
+ echo "Returned failed status $status!"
+ exit $status
+ fi
+}
+
+#
+# Execute tiffinfo on a specified file to validate it
+#
+# f_tiffinfo_validate infile
+f_tiffinfo_validate ()
+{
+ f_test_reader "$TIFFINFO -D" $1
+}
+
+if test "$VERBOSE" = TRUE
+then
+ set -x
+fi
+
diff --git a/tiff/test/custom_dir.c b/tiff/test/custom_dir.c
new file mode 100755
index 0000000..acf55ce
--- /dev/null
+++ b/tiff/test/custom_dir.c
@@ -0,0 +1,247 @@
+/* $Id: custom_dir.c,v 1.3 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2012, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to handling of custom directories like EXIF.
+ */
+
+#include "tif_config.h"
+#include <stdio.h>
+#include <string.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+#include "tif_dir.h"
+#include "tifftest.h"
+
+static const char filename[] = "custom_dir.tif";
+
+#define SPP 3 /* Samples per pixel */
+const uint16 width = 1;
+const uint16 length = 1;
+const uint16 bps = 8;
+const uint16 photometric = PHOTOMETRIC_RGB;
+const uint16 rows_per_strip = 1;
+const uint16 planarconfig = PLANARCONFIG_CONTIG;
+
+static TIFFField
+customFields[] = {
+ { TIFFTAG_IMAGEWIDTH, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Custom1", NULL },
+ { TIFFTAG_DOTRANGE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Custom2", NULL },
+};
+
+static TIFFFieldArray customFieldArray = { tfiatOther, 0, 2, customFields };
+
+int
+main()
+{
+ TIFF *tif;
+ unsigned char buf[SPP] = { 0, 127, 255 };
+ uint64 dir_offset = 0, dir_offset2 = 0;
+ uint64 read_dir_offset = 0, read_dir_offset2 = 0;
+ uint64 *dir_offset2_ptr = NULL;
+ char *ascii_value;
+ uint16 count16 = 0;
+
+
+ /* We write the main directory as a simple image. */
+ tif = TIFFOpen(filename, "w+");
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ /* Write dummy pixel data. */
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ if (!TIFFWriteDirectory( tif )) {
+ fprintf (stderr, "TIFFWriteDirectory() failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Now create an EXIF directory.
+ */
+ if (TIFFCreateEXIFDirectory(tif) != 0) {
+ fprintf (stderr, "TIFFCreateEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, EXIFTAG_SPECTRALSENSITIVITY, "EXIF Spectral Sensitivity")) {
+ fprintf (stderr, "Can't write SPECTRALSENSITIVITY\n" );
+ goto failure;
+ }
+
+ if (!TIFFWriteCustomDirectory( tif, &dir_offset )) {
+ fprintf (stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Now create a custom directory with tags that conflict with mainline
+ * TIFF tags.
+ */
+
+ TIFFFreeDirectory( tif );
+ if (TIFFCreateCustomDirectory(tif, &customFieldArray) != 0) {
+ fprintf (stderr, "TIFFCreateEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, TIFFTAG_IMAGEWIDTH, "*Custom1")) { /* not really IMAGEWIDTH */
+ fprintf (stderr, "Can't write pseudo-IMAGEWIDTH.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, TIFFTAG_DOTRANGE, "*Custom2")) { /* not really DOTWIDTH */
+ fprintf (stderr, "Can't write pseudo-DOTWIDTH.\n" );
+ goto failure;
+ }
+
+ if (!TIFFWriteCustomDirectory( tif, &dir_offset2 )) {
+ fprintf (stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Go back to the first directory, and add the EXIFIFD pointer.
+ */
+ TIFFSetDirectory(tif, 0);
+ TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset );
+ TIFFSetField(tif, TIFFTAG_SUBIFD, 1, &dir_offset2 );
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values in the EXIF directory. */
+ tif = TIFFOpen(filename, "r");
+
+ TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset );
+ if( read_dir_offset != dir_offset ) {
+ fprintf (stderr, "Did not get expected EXIFIFD.\n" );
+ goto failure;
+ }
+
+ TIFFGetField(tif, TIFFTAG_SUBIFD, &count16, &dir_offset2_ptr );
+ read_dir_offset2 = dir_offset2_ptr[0];
+ if( read_dir_offset2 != dir_offset2 || count16 != 1) {
+ fprintf (stderr, "Did not get expected SUBIFD.\n" );
+ goto failure;
+ }
+
+ if( !TIFFReadEXIFDirectory(tif, read_dir_offset) ) {
+ fprintf (stderr, "TIFFReadEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, EXIFTAG_SPECTRALSENSITIVITY, &ascii_value) ) {
+ fprintf (stderr, "reading SPECTRALSENSITIVITY failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"EXIF Spectral Sensitivity") != 0) {
+ fprintf (stderr, "got wrong SPECTRALSENSITIVITY value.\n" );
+ goto failure;
+ }
+
+ /* Try reading the Custom directory */
+
+ if( !TIFFReadCustomDirectory(tif, read_dir_offset2, &customFieldArray) ) {
+ fprintf (stderr, "TIFFReadCustomDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &ascii_value) ) {
+ fprintf (stderr, "reading pseudo-IMAGEWIDTH failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"*Custom1") != 0) {
+ fprintf (stderr, "got wrong pseudo-IMAGEWIDTH value.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, TIFFTAG_DOTRANGE, &ascii_value) ) {
+ fprintf (stderr, "reading pseudo-DOTRANGE failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"*Custom2") != 0) {
+ fprintf (stderr, "got wrong pseudo-DOTRANGE value.\n" );
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+failure:
+ /*
+ * Something goes wrong; close file and return unsuccessful status.
+ * Do not remove the file for further manual investigation.
+ */
+ TIFFClose(tif);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/gif2tiff.sh b/tiff/test/gif2tiff.sh
new file mode 100755
index 0000000..6bf9a12
--- /dev/null
+++ b/tiff/test/gif2tiff.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_PALETTE_1C_8B_GIF"
+outfile="o-gif2tiff.tiff"
+f_test_convert "$GIF2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/long_tag.c b/tiff/test/long_tag.c
new file mode 100755
index 0000000..ab1440a
--- /dev/null
+++ b/tiff/test/long_tag.c
@@ -0,0 +1,156 @@
+/* $Id: long_tag.c,v 1.5 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to test LONG tags read/write functions.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+
+extern int CheckLongField(TIFF *, ttag_t, uint32);
+
+const char *filename = "long_test.tiff";
+
+static struct Tags {
+ ttag_t tag;
+ short count;
+ uint32 value;
+} long_tags[] = {
+ { TIFFTAG_SUBFILETYPE, 1, FILETYPE_REDUCEDIMAGE|FILETYPE_PAGE|FILETYPE_MASK }
+};
+#define NTAGS (sizeof (long_tags) / sizeof (long_tags[0]))
+
+const uint32 width = 1;
+const uint32 length = 1;
+const uint32 rows_per_strip = 1;
+
+int
+main(int argc, char **argv)
+{
+ TIFF *tif;
+ unsigned int i;
+ unsigned char buf[3] = { 0, 127, 255 };
+ (void) argc;
+ (void) argv;
+
+ /* Test whether we can write tags. */
+ tif = TIFFOpen(filename, "w");
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 3)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ for (i = 0; i < NTAGS; i++) {
+ if (!TIFFSetField(tif, long_tags[i].tag,
+ long_tags[i].value)) {
+ fprintf(stderr, "Can't set tag %d.\n",
+ (int)long_tags[i].tag);
+ goto failure;
+ }
+ }
+
+ /* Write dummy pixel data. */
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values. */
+ tif = TIFFOpen(filename, "r");
+ if (!tif) {
+ fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0)
+ goto failure;
+
+ if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0)
+ goto failure;
+
+ if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0)
+ goto failure;
+
+ for (i = 0; i < NTAGS; i++) {
+ if (CheckLongField(tif, long_tags[i].tag,
+ long_tags[i].value) < 0)
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+failure:
+ /* Something goes wrong; close file and return unsuccessful status. */
+ TIFFClose(tif);
+ unlink(filename);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/ppm2tiff_pbm.sh b/tiff/test/ppm2tiff_pbm.sh
new file mode 100755
index 0000000..68d9e45
--- /dev/null
+++ b/tiff/test/ppm2tiff_pbm.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_MINISWHITE_1C_1B_PBM"
+outfile="o-ppm2tiff_pbm.tiff"
+f_test_convert "$PPM2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/ppm2tiff_pgm.sh b/tiff/test/ppm2tiff_pgm.sh
new file mode 100755
index 0000000..001ec70
--- /dev/null
+++ b/tiff/test/ppm2tiff_pgm.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_MINISBLACK_1C_8B_PGM"
+outfile="o-ppm2tiff_pgm.tiff"
+f_test_convert "$PPM2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/ppm2tiff_ppm.sh b/tiff/test/ppm2tiff_ppm.sh
new file mode 100755
index 0000000..8a81527
--- /dev/null
+++ b/tiff/test/ppm2tiff_ppm.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$IMG_RGB_3C_8B_PPM"
+outfile="o-ppm2tiff_ppm.tiff"
+f_test_convert "$PPM2TIFF" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/raw_decode.c b/tiff/test/raw_decode.c
new file mode 100755
index 0000000..6d31eab
--- /dev/null
+++ b/tiff/test/raw_decode.c
@@ -0,0 +1,274 @@
+/* $Id: raw_decode.c,v 1.5 2012-12-20 18:08:07 tgl Exp $ */
+
+/*
+ * Copyright (c) 2012, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * The objective of this test suite is to test the JPEGRawDecode()
+ * interface via TIFReadEncodedTile(). This function with YCbCr subsampling
+ * is a frequent source of bugs.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+
+#include "jpeglib.h" /* Needed for JPEG_LIB_VERSION */
+
+static unsigned char cluster_0[] = { 0, 0, 2, 0, 138, 139 };
+static unsigned char cluster_64[] = { 0, 0, 9, 6, 134, 119 };
+static unsigned char cluster_128[] = { 44, 40, 63, 59, 230, 95 };
+
+static int check_cluster( int cluster, unsigned char *buffer, unsigned char *expected_cluster ) {
+ unsigned char *target = buffer + cluster*6;
+
+ if (memcmp(target, expected_cluster, 6) == 0) {
+ return 0;
+ }
+
+ fprintf( stderr, "Cluster %d did not match expected results.\n", cluster );
+ fprintf( stderr,
+ "Expect: %3d %3d %3d %3d\n"
+ " %3d %3d\n",
+ expected_cluster[0], expected_cluster[1],
+ expected_cluster[4], expected_cluster[5],
+ expected_cluster[2], expected_cluster[3] );
+ fprintf( stderr,
+ " Got: %3d %3d %3d %3d\n"
+ " %3d %3d\n",
+ target[0], target[1],
+ target[4], target[5],
+ target[2], target[3] );
+ return 1;
+}
+
+static int check_rgb_pixel( int pixel,
+ int min_red, int max_red,
+ int min_green, int max_green,
+ int min_blue, int max_blue,
+ unsigned char *buffer ) {
+ unsigned char *rgb = buffer + 3 * pixel;
+
+ if( rgb[0] >= min_red && rgb[0] <= max_red &&
+ rgb[1] >= min_green && rgb[1] <= max_green &&
+ rgb[2] >= min_blue && rgb[2] <= max_blue ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d)\n",
+ rgb[0], min_red, max_red,
+ rgb[1], min_green, max_green,
+ rgb[2], min_blue, max_blue );
+ return 1;
+}
+
+static int check_rgba_pixel( int pixel,
+ int min_red, int max_red,
+ int min_green, int max_green,
+ int min_blue, int max_blue,
+ int min_alpha, int max_alpha,
+ uint32 *buffer ) {
+ /* RGBA images are upside down - adjust for normal ordering */
+ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
+ uint32 rgba = buffer[adjusted_pixel];
+
+ if( TIFFGetR(rgba) >= (uint32) min_red &&
+ TIFFGetR(rgba) <= (uint32) max_red &&
+ TIFFGetG(rgba) >= (uint32) min_green &&
+ TIFFGetG(rgba) <= (uint32) max_green &&
+ TIFFGetB(rgba) >= (uint32) min_blue &&
+ TIFFGetB(rgba) <= (uint32) max_blue &&
+ TIFFGetA(rgba) >= (uint32) min_alpha &&
+ TIFFGetA(rgba) <= (uint32) max_alpha ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d), A=%d (expected %d..%d)\n",
+ TIFFGetR(rgba), min_red, max_red,
+ TIFFGetG(rgba), min_green, max_green,
+ TIFFGetB(rgba), min_blue, max_blue,
+ TIFFGetA(rgba), min_alpha, max_alpha );
+ return 1;
+}
+
+int
+main(int argc, char **argv)
+{
+ TIFF *tif;
+ static const char *srcfilerel = "images/quad-tile.jpg.tiff";
+ char *srcdir = NULL;
+ char srcfile[1024];
+ unsigned short h, v;
+ int status;
+ unsigned char *buffer;
+ uint32 *rgba_buffer;
+ tsize_t sz, szout;
+ unsigned int pixel_status = 0;
+
+ (void) argc;
+ (void) argv;
+
+ if ((srcdir = getenv("srcdir")) == NULL) {
+ srcdir = ".";
+ }
+ if ((strlen(srcdir) + 1 + strlen(srcfilerel)) >= sizeof(srcfile)) {
+ fprintf( stderr, "srcdir too long %s\n", srcdir);
+ exit( 1 );
+ }
+ strcpy(srcfile,srcdir);
+ strcat(srcfile,"/");
+ strcat(srcfile,srcfilerel);
+
+ tif = TIFFOpen(srcfile,"r");
+ if ( tif == NULL ) {
+ fprintf( stderr, "Could not open %s\n", srcfile);
+ exit( 1 );
+ }
+
+ status = TIFFGetField(tif,TIFFTAG_YCBCRSUBSAMPLING, &h, &v);
+ if ( status == 0 || h != 2 || v != 2) {
+ fprintf( stderr, "Could not retrieve subsampling tag.\n" );
+ exit(1);
+ }
+
+ /*
+ * What is the appropriate size of a YCbCr encoded tile?
+ */
+ sz = TIFFTileSize(tif);
+ if( sz != 24576) {
+ fprintf(stderr, "tiles are %d bytes\n", (int)sz);
+ exit(1);
+ }
+
+ buffer = (unsigned char *) malloc(sz);
+
+ /*
+ * Read a tile in decompressed form, but still YCbCr subsampled.
+ */
+ szout = TIFFReadEncodedTile(tif,9,buffer,sz);
+ if (szout != sz) {
+ fprintf( stderr,
+ "Did not get expected result code from TIFFReadEncodedTile()(%d instead of %d)\n",
+ (int) szout, (int) sz );
+ return 1;
+ }
+
+ if( check_cluster( 0, buffer, cluster_0 )
+ || check_cluster( 64, buffer, cluster_64 )
+ || check_cluster( 128, buffer, cluster_128 ) ) {
+ exit(1);
+ }
+ free(buffer);
+
+ /*
+ * Read a tile using the built-in conversion to RGB format provided by the JPEG library.
+ */
+ TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
+
+ sz = TIFFTileSize(tif);
+ if( sz != 128*128*3) {
+ fprintf(stderr, "tiles are %d bytes\n", (int)sz);
+ exit(1);
+ }
+
+ buffer = (unsigned char *) malloc(sz);
+
+ szout = TIFFReadEncodedTile(tif,9,buffer,sz);
+ if (szout != sz) {
+ fprintf( stderr,
+ "Did not get expected result code from TIFFReadEncodedTile()(%d instead of %d)\n",
+ (int) szout, (int) sz );
+ return 1;
+ }
+
+ /*
+ * JPEG decoding is inherently inexact, so we can't test for exact
+ * pixel values. (Well, if we knew exactly which libjpeg version
+ * we were using, and with what settings, we could expect specific
+ * values ... but it's not worth the trouble to keep track of.)
+ * Hence, use ranges of expected values. The ranges may need to be
+ * widened over time as more versions of libjpeg appear.
+ */
+ pixel_status |= check_rgb_pixel( 0, 15, 18, 0, 0, 18, 41, buffer );
+ pixel_status |= check_rgb_pixel( 64, 0, 0, 0, 0, 0, 2, buffer );
+ pixel_status |= check_rgb_pixel( 512, 5, 6, 34, 36, 182, 196, buffer );
+
+ free( buffer );
+
+ TIFFClose(tif);
+
+ /*
+ * Reopen and test reading using the RGBA interface.
+ */
+ tif = TIFFOpen(srcfile,"r");
+
+ sz = 128 * 128 * sizeof(uint32);
+ rgba_buffer = (uint32 *) malloc(sz);
+
+ if (!TIFFReadRGBATile( tif, 1*128, 2*128, rgba_buffer )) {
+ fprintf( stderr, "TIFFReadRGBATile() returned failure code.\n" );
+ return 1;
+ }
+
+ /*
+ * Currently TIFFReadRGBATile() just uses JPEGCOLORMODE_RGB so this
+ * trivally matches the last results. Eventually we should actually
+ * accomplish it from the YCbCr subsampled buffer ourselves in which
+ * case the results may be subtly different but similar.
+ */
+ pixel_status |= check_rgba_pixel( 0, 15, 18, 0, 0, 18, 41, 255, 255,
+ rgba_buffer );
+ pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 0, 0, 2, 255, 255,
+ rgba_buffer );
+ pixel_status |= check_rgba_pixel( 512, 5, 6, 34, 36, 182, 196, 255, 255,
+ rgba_buffer );
+
+ free( rgba_buffer );
+ TIFFClose(tif);
+
+ if (pixel_status) {
+ exit(1);
+ }
+
+ exit( 0 );
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */
diff --git a/tiff/test/rewrite_tag.c b/tiff/test/rewrite_tag.c
new file mode 100755
index 0000000..de0b551
--- /dev/null
+++ b/tiff/test/rewrite_tag.c
@@ -0,0 +1,346 @@
+/* $Id: rewrite_tag.c,v 1.6 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2007, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to test _TIFFRewriteField().
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+#include "tiffiop.h"
+
+const uint32 width = 10;
+const uint32 length = 40;
+const uint32 rows_per_strip = 1;
+
+int test_packbits()
+
+{
+ TIFF *tif;
+ int i;
+ unsigned char buf[10] = {0,0,0,0,0,0,0,0,0,0};
+
+ int length = 20;
+ const char *filename = "test_packbits.tif";
+
+ /* Test whether we can write tags. */
+ tif = TIFFOpen(filename, "w");
+
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS)) {
+ fprintf (stderr, "Can't set Compression tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+
+ for (i = 0; i < length; i++ )
+ {
+ if( !TIFFWriteEncodedStrip( tif, i, buf, 10 ) )
+ {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+ }
+
+ TIFFClose(tif);
+
+ /* Test whether we can write tags. */
+
+ tif = TIFFOpen(filename, "r+");
+
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ buf[3] = 17;
+ buf[6] = 12;
+
+ if( !TIFFWriteEncodedStrip( tif, 6, buf, 10 ) )
+ {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ unlink(filename);
+
+ return 0;
+
+ failure:
+ /* Something goes wrong; close file and return unsuccessful status. */
+ TIFFClose(tif);
+ /* unlink(filename); */
+
+ return 1;
+
+}
+
+/************************************************************************/
+/* rewrite_test() */
+/************************************************************************/
+int rewrite_test( const char *filename, int length, int bigtiff,
+ uint64 base_value )
+
+{
+ TIFF *tif;
+ int i;
+ unsigned char buf[10] = {5,6,7,8,9,10,11,12,13,14};
+ uint64 *rowoffset, *rowbytes;
+ uint64 *upd_rowoffset;
+ uint64 *upd_bytecount;
+
+ /* Test whether we can write tags. */
+ if( bigtiff )
+ tif = TIFFOpen(filename, "w8");
+ else
+ tif = TIFFOpen(filename, "w4");
+
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_PACKBITS)) {
+ fprintf (stderr, "Can't set Compression tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+
+ for (i = 0; i < length; i++ )
+ {
+ if( TIFFWriteScanline( tif, buf, i, 0 ) == -1 )
+ {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+ }
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values. */
+ tif = TIFFOpen(filename, "r+");
+ if (!tif) {
+ fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if( !TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &rowoffset ) )
+ {
+ fprintf (stderr, "Can't fetch STRIPOFFSETS.\n");
+ goto failure;
+ }
+
+ if( !TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &rowbytes ) )
+ {
+ fprintf (stderr, "Can't fetch STRIPBYTECOUNTS.\n");
+ goto failure;
+ }
+
+ upd_rowoffset = (uint64 *) _TIFFmalloc(sizeof(uint64) * length);
+ for( i = 0; i < length; i++ )
+ upd_rowoffset[i] = base_value + i*10;
+
+ if( !_TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8,
+ length, upd_rowoffset ) )
+ {
+ fprintf (stderr, "Can't rewrite STRIPOFFSETS.\n");
+ goto failure;
+ }
+
+ _TIFFfree( upd_rowoffset );
+
+ upd_bytecount = (uint64 *) _TIFFmalloc(sizeof(uint64) * length);
+ for( i = 0; i < length; i++ )
+ upd_bytecount[i] = 100 + i*10;
+
+ if( !_TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG8,
+ length, upd_bytecount ) )
+ {
+ fprintf (stderr, "Can't rewrite STRIPBYTECOUNTS.\n");
+ goto failure;
+ }
+
+ _TIFFfree( upd_bytecount );
+
+ TIFFClose(tif);
+
+ /* Reopen file and read back to verify contents */
+
+ tif = TIFFOpen(filename, "r");
+ if (!tif) {
+ fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if( !TIFFGetField( tif, TIFFTAG_STRIPOFFSETS, &rowoffset ) )
+ {
+ fprintf (stderr, "Can't fetch STRIPOFFSETS.\n");
+ goto failure;
+ }
+
+ for( i = 0; i < length; i++ )
+ {
+ uint64 expect = base_value + i*10;
+
+ if( rowoffset[i] != expect )
+ {
+ fprintf( stderr,
+ "%s:STRIPOFFSETS[%d]: Got %X:%08X instead of %X:%08X.\n",
+ filename, i,
+ (int) (rowoffset[i] >> 32),
+ (int) (rowoffset[i]&0xFFFFFFFF),
+ (int) (expect >> 32),
+ (int) (expect & 0xFFFFFFFF) );
+ goto failure;
+ }
+ }
+
+ if( !TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &rowbytes ) )
+ {
+ fprintf (stderr, "Can't fetch STRIPBYTECOUNTS.\n");
+ goto failure;
+ }
+
+ for( i = 0; i < length; i++ )
+ {
+ uint64 expect = 100 + i*10;
+
+ if( rowbytes[i] != expect )
+ {
+ fprintf( stderr,
+ "%s:STRIPBYTECOUNTS[%d]: Got %X:%08X instead of %X:%08X.\n",
+ filename, i,
+ (int) (rowbytes[i] >> 32),
+ (int) (rowbytes[i] & 0xFFFFFFFF),
+ (int) (expect >> 32),
+ (int) (expect & 0xFFFFFFFF) );
+ goto failure;
+ }
+ }
+
+ TIFFClose( tif );
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+ failure:
+ /* Something goes wrong; close file and return unsuccessful status. */
+ TIFFClose(tif);
+ /* unlink(filename); */
+
+ return 1;
+
+}
+
+/************************************************************************/
+/* main() */
+/************************************************************************/
+int
+main(int argc, char **argv)
+{
+ (void) argc;
+ (void) argv;
+ int failure = 0;
+
+ failure |= test_packbits();
+
+ /* test fairly normal use */
+ failure |= rewrite_test( "rewrite1.tif", 10, 0, 100 );
+ failure |= rewrite_test( "rewrite2.tif", 10, 1, 100 );
+
+ /* test case of fitting all in directory entry */
+ failure |= rewrite_test( "rewrite3.tif", 1, 0, 100 );
+ failure |= rewrite_test( "rewrite4.tif", 1, 1, 100 );
+
+ /* test with very large values that don't fit in 4bytes (bigtiff only) */
+ failure |= rewrite_test( "rewrite5.tif", 1000, 1, 0x6000000000ULL );
+ failure |= rewrite_test( "rewrite6.tif", 1, 1, 0x6000000000ULL );
+
+ return failure;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/short_tag.c b/tiff/test/short_tag.c
new file mode 100755
index 0000000..efc7da5
--- /dev/null
+++ b/tiff/test/short_tag.c
@@ -0,0 +1,205 @@
+/* $Id: short_tag.c,v 1.9 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to test SHORT tags read/write functions.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+#include "tifftest.h"
+
+static const char filename[] = "short_test.tiff";
+
+#define SPP 3 /* Samples per pixel */
+const uint16 width = 1;
+const uint16 length = 1;
+const uint16 bps = 8;
+const uint16 photometric = PHOTOMETRIC_RGB;
+const uint16 rows_per_strip = 1;
+const uint16 planarconfig = PLANARCONFIG_CONTIG;
+
+static const struct {
+ const ttag_t tag;
+ const uint16 value;
+} short_single_tags[] = {
+ { TIFFTAG_COMPRESSION, COMPRESSION_NONE },
+ { TIFFTAG_FILLORDER, FILLORDER_MSB2LSB },
+ { TIFFTAG_ORIENTATION, ORIENTATION_BOTRIGHT },
+ { TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH },
+ { TIFFTAG_MINSAMPLEVALUE, 23 },
+ { TIFFTAG_MAXSAMPLEVALUE, 241 },
+ { TIFFTAG_INKSET, INKSET_MULTIINK },
+ { TIFFTAG_NUMBEROFINKS, SPP },
+ { TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT }
+};
+#define NSINGLETAGS (sizeof(short_single_tags) / sizeof(short_single_tags[0]))
+
+static const struct {
+ const ttag_t tag;
+ const uint16 values[2];
+} short_paired_tags[] = {
+ { TIFFTAG_PAGENUMBER, {1, 1} },
+ { TIFFTAG_HALFTONEHINTS, {0, 255} },
+ { TIFFTAG_DOTRANGE, {8, 16} },
+ { TIFFTAG_YCBCRSUBSAMPLING, {2, 1} }
+};
+#define NPAIREDTAGS (sizeof(short_paired_tags) / sizeof(short_paired_tags[0]))
+
+int
+main()
+{
+ TIFF *tif;
+ size_t i;
+ unsigned char buf[SPP] = { 0, 127, 255 };
+
+ /* Test whether we can write tags. */
+ tif = TIFFOpen(filename, "w");
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ for (i = 0; i < NSINGLETAGS; i++) {
+ if (!TIFFSetField(tif, short_single_tags[i].tag,
+ short_single_tags[i].value)) {
+ fprintf(stderr, "Can't set tag %lu.\n",
+ (unsigned long)short_single_tags[i].tag);
+ goto failure;
+ }
+ }
+
+ for (i = 0; i < NPAIREDTAGS; i++) {
+ if (!TIFFSetField(tif, short_paired_tags[i].tag,
+ short_paired_tags[i].values[0],
+ short_paired_tags[i].values[1])) {
+ fprintf(stderr, "Can't set tag %lu.\n",
+ (unsigned long)short_paired_tags[i].tag);
+ goto failure;
+ }
+ }
+
+ /* Write dummy pixel data. */
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values. */
+ tif = TIFFOpen(filename, "r");
+ if (!tif) {
+ fprintf (stderr, "Can't open test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (CheckLongField(tif, TIFFTAG_IMAGEWIDTH, width) < 0)
+ goto failure;
+
+ if (CheckLongField(tif, TIFFTAG_IMAGELENGTH, length) < 0)
+ goto failure;
+
+ if (CheckShortField(tif, TIFFTAG_BITSPERSAMPLE, bps) < 0)
+ goto failure;
+
+ if (CheckShortField(tif, TIFFTAG_PHOTOMETRIC, photometric) < 0)
+ goto failure;
+
+ if (CheckShortField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP) < 0)
+ goto failure;
+
+ if (CheckLongField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip) < 0)
+ goto failure;
+
+ if (CheckShortField(tif, TIFFTAG_PLANARCONFIG, planarconfig) < 0)
+ goto failure;
+
+ for (i = 0; i < NSINGLETAGS; i++) {
+ if (CheckShortField(tif, short_single_tags[i].tag,
+ short_single_tags[i].value) < 0)
+ goto failure;
+ }
+
+ for (i = 0; i < NPAIREDTAGS; i++) {
+ if (CheckShortPairedField(tif, short_paired_tags[i].tag,
+ short_paired_tags[i].values) < 0)
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+failure:
+ /*
+ * Something goes wrong; close file and return unsuccessful status.
+ * Do not remove the file for further manual investigation.
+ */
+ TIFFClose(tif);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/strip.c b/tiff/test/strip.c
new file mode 100755
index 0000000..5942226
--- /dev/null
+++ b/tiff/test/strip.c
@@ -0,0 +1,290 @@
+/* $Id: strip.c,v 1.5 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Functions to test strip interface of libtiff.
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "tiffio.h"
+
+int
+write_strips(TIFF *tif, const tdata_t array, const tsize_t size)
+{
+ tstrip_t strip, nstrips;
+ tsize_t stripsize, offset;
+
+ stripsize = TIFFStripSize(tif);
+ if (!stripsize) {
+ fprintf (stderr, "Wrong size of strip.\n");
+ return -1;
+ }
+
+ nstrips = TIFFNumberOfStrips(tif);
+ for (offset = 0, strip = 0;
+ offset < size && strip < nstrips;
+ offset+=stripsize, strip++) {
+ /*
+ * Properly write last strip.
+ */
+ tsize_t bufsize = size - offset;
+ if (bufsize > stripsize)
+ bufsize = stripsize;
+
+ if (TIFFWriteEncodedStrip(tif, strip, (char *)array + offset,
+ bufsize) != bufsize) {
+ fprintf (stderr, "Can't write strip %lu.\n",
+ (unsigned long)strip);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+int
+read_strips(TIFF *tif, const tdata_t array, const tsize_t size)
+{
+ tstrip_t strip, nstrips;
+ tsize_t stripsize, offset;
+ tdata_t buf = NULL;
+
+ stripsize = TIFFStripSize(tif);
+ if (!stripsize) {
+ fprintf (stderr, "Wrong size of strip.\n");
+ return -1;
+ }
+
+ buf = _TIFFmalloc(stripsize);
+ if (!buf) {
+ fprintf (stderr, "Can't allocate space for strip buffer.\n");
+ return -1;
+ }
+
+ nstrips = TIFFNumberOfStrips(tif);
+ for (offset = 0, strip = 0;
+ offset < size && strip < nstrips;
+ offset+=stripsize, strip++) {
+ /*
+ * Properly read last strip.
+ */
+ tsize_t bufsize = size - offset;
+ if (bufsize > stripsize)
+ bufsize = stripsize;
+
+ if (TIFFReadEncodedStrip(tif, strip, buf, -1) != bufsize) {
+ fprintf (stderr, "Can't read strip %lu.\n",
+ (unsigned long)strip);
+ return -1;
+ }
+ if (memcmp(buf, (char *)array + offset, bufsize) != 0) {
+ fprintf (stderr, "Wrong data read for strip %lu.\n",
+ (unsigned long)strip);
+ _TIFFfree(buf);
+ return -1;
+ }
+ }
+
+ _TIFFfree(buf);
+
+ return 0;
+}
+
+int
+create_image_striped(const char *name, uint32 width, uint32 length,
+ uint32 rowsperstrip, uint16 compression,
+ uint16 spp, uint16 bps, uint16 photometric,
+ uint16 sampleformat, uint16 planarconfig,
+ const tdata_t array, const tsize_t size)
+{
+ TIFF *tif;
+
+ /* Test whether we can write tags. */
+ tif = TIFFOpen(name, "w");
+ if (!tif)
+ goto openfailure;
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, spp)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip)) {
+ fprintf (stderr, "Can't set RowsPerStrip tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ if (write_strips(tif, array, size) < 0) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+ return 0;
+
+failure:
+ TIFFClose(tif);
+openfailure:
+ fprintf (stderr, "Can't create test TIFF file %s:\n"
+" ImageWidth=%ld, ImageLength=%ld, RowsPerStrip=%ld, Compression=%d,\n"
+" BitsPerSample=%d, SamplesPerPixel=%d, SampleFormat=%d,\n"
+" PlanarConfiguration=%d, PhotometricInterpretation=%d.\n",
+ name, (long) width, (long) length, (long) rowsperstrip,
+ compression, bps, spp, sampleformat, planarconfig,
+ photometric);
+ return -1;
+}
+
+int
+read_image_striped(const char *name, uint32 width, uint32 length,
+ uint32 rowsperstrip, uint16 compression,
+ uint16 spp, uint16 bps, uint16 photometric,
+ uint16 sampleformat, uint16 planarconfig,
+ const tdata_t array, const tsize_t size)
+{
+ TIFF *tif;
+ uint16 value_u16;
+ uint32 value_u32;
+
+ /* Test whether we can read written values. */
+ tif = TIFFOpen(name, "r");
+ if (!tif)
+ goto openfailure;
+
+ if (TIFFIsTiled(tif)) {
+ fprintf (stderr, "Can't read image %s, it is tiled.\n",
+ name);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &value_u32)
+ || value_u32 != width) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGEWIDTH);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &value_u32)
+ || value_u32 != length) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGELENGTH);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &value_u16)
+ || value_u16 != bps) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_BITSPERSAMPLE);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &value_u16)
+ || value_u16 != photometric) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_PHOTOMETRIC);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &value_u16)
+ || value_u16 != spp) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_SAMPLESPERPIXEL);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &value_u32)
+ || value_u32 != rowsperstrip) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_ROWSPERSTRIP);
+ goto failure;
+ }
+ if (!TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &value_u16)
+ || value_u16 != planarconfig) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_PLANARCONFIG);
+ goto failure;
+ }
+
+ if (read_strips(tif, array, size) < 0) {
+ fprintf (stderr, "Can't read image data.\n");
+ goto failure;
+ }
+
+ TIFFClose(tif);
+ return 0;
+
+failure:
+ TIFFClose(tif);
+openfailure:
+ fprintf (stderr, "Can't read test TIFF file %s:\n"
+" ImageWidth=%ld, ImageLength=%ld, RowsPerStrip=%ld, Compression=%d,\n"
+" BitsPerSample=%d, SamplesPerPixel=%d, SampleFormat=%d,\n"
+" PlanarConfiguration=%d, PhotometricInterpretation=%d.\n",
+ name, (long) width, (long) length, (long) rowsperstrip,
+ compression, bps, spp, sampleformat, planarconfig,
+ photometric);
+ return -1;
+}
+
+int
+write_scanlines(TIFF *tif, const tdata_t array, const tsize_t size)
+{
+ uint32 length, row;
+ tsize_t scanlinesize, offset;
+ (void) size;
+
+ if (!TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &length)) {
+ fprintf (stderr, "Can't get tag %d.\n", TIFFTAG_IMAGELENGTH);
+ return -1;
+ }
+
+ scanlinesize = TIFFScanlineSize(tif);
+ if (!scanlinesize) {
+ fprintf (stderr, "Wrong size of scanline.\n");
+ return -1;
+ }
+
+ for (offset = 0, row = 0; row < length; offset+=scanlinesize, row++) {
+ if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) == -1) {
+ fprintf (stderr,
+ "Can't write image data at row %lu.\n", (long) row);
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/strip_rw.c b/tiff/test/strip_rw.c
new file mode 100755
index 0000000..9eeeb51
--- /dev/null
+++ b/tiff/test/strip_rw.c
@@ -0,0 +1,157 @@
+/* $Id: strip_rw.c,v 1.6 2008-03-28 01:42:07 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Test libtiff input/output routines.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+#include "test_arrays.h"
+
+extern int
+create_image_striped(const char *, uint32, uint32, uint32, uint16, uint16,
+ uint16, uint16, uint16, uint16, const tdata_t,
+ const tsize_t);
+extern int
+read_image_striped(const char *, uint32, uint32, uint32, uint16, uint16,
+ uint16, uint16, uint16, uint16, const tdata_t,
+ const tsize_t);
+
+const char *filename = "strip_test.tiff";
+
+int
+main(int argc, char **argv)
+{
+ uint32 rowsperstrip;
+ uint16 compression;
+ uint16 spp, bps, photometric, sampleformat, planarconfig;
+ (void) argc;
+ (void) argv;
+
+ /*
+ * Test two special cases: image consisting from single line and image
+ * consisting from single column.
+ */
+ rowsperstrip = 1;
+ compression = COMPRESSION_NONE;
+ spp = 1;
+ bps = 8;
+ photometric = PHOTOMETRIC_MINISBLACK;
+ sampleformat = SAMPLEFORMAT_UINT;
+ planarconfig = PLANARCONFIG_CONTIG;
+
+ if (create_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't create TIFF file %s.\n", filename);
+ goto failure;
+ }
+ if (read_image_striped(filename, XSIZE * YSIZE, 1, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't read TIFF file %s.\n", filename);
+ goto failure;
+ }
+ unlink(filename);
+
+ if (create_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't create TIFF file %s.\n", filename);
+ goto failure;
+ }
+ if (read_image_striped(filename, 1, XSIZE * YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't read TIFF file %s.\n", filename);
+ goto failure;
+ }
+ unlink(filename);
+
+ /*
+ * Test one-channel image with different parameters.
+ */
+ rowsperstrip = 1;
+ spp = 1;
+ bps = 8;
+ photometric = PHOTOMETRIC_MINISBLACK;
+ sampleformat = SAMPLEFORMAT_UINT;
+ planarconfig = PLANARCONFIG_CONTIG;
+
+ if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't create TIFF file %s.\n", filename);
+ goto failure;
+ }
+ if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't read TIFF file %s.\n", filename);
+ goto failure;
+ }
+ unlink(filename);
+
+ rowsperstrip = YSIZE;
+ if (create_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't create TIFF file %s.\n", filename);
+ goto failure;
+ }
+ if (read_image_striped(filename, XSIZE, YSIZE, rowsperstrip,
+ compression, spp, bps, photometric,
+ sampleformat, planarconfig,
+ (const tdata_t) byte_array1, byte_array1_size) < 0) {
+ fprintf (stderr, "Can't read TIFF file %s.\n", filename);
+ goto failure;
+ }
+ unlink(filename);
+
+ return 0;
+
+failure:
+ unlink(filename);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/test_arrays.c b/tiff/test/test_arrays.c
new file mode 100755
index 0000000..03580fb
--- /dev/null
+++ b/tiff/test/test_arrays.c
@@ -0,0 +1,829 @@
+/* $Id: test_arrays.c,v 1.3 2006-03-23 14:54:02 dron Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Numerical arrays used to test libtiff's read/write functions.
+ */
+
+#include <stddef.h>
+
+#include "test_arrays.h"
+
+const unsigned char byte_array1[XSIZE * YSIZE]=
+{
+86, 84, 86, 90, 89, 85, 90, 78, 77, 79, 75, 77, 79, 86,
+87, 83, 82, 87, 89, 88, 86, 87, 88, 87, 81, 84, 85, 85,
+84, 86, 88, 91, 96, 95, 97, 95, 89,
+85, 82, 81, 88, 89, 85, 89, 83, 74, 79, 76, 77, 80, 87,
+87, 84, 84, 88, 90, 89, 87, 85, 87, 88, 83, 80, 82, 84,
+85, 87, 90, 95, 96, 95, 95, 92, 90,
+85, 81, 79, 84, 90, 87, 88, 88, 73, 79, 75, 76, 79, 88,
+88, 87, 85, 90, 92, 89, 88, 88, 87, 86, 84, 82, 82, 83,
+87, 89, 93, 94, 93, 93, 92, 92, 96,
+85, 82, 76, 80, 88, 89, 88, 89, 73, 80, 75, 75, 77, 89,
+92, 93, 91, 89, 94, 92, 90, 89, 88, 84, 84, 82, 82, 85,
+88, 91, 94, 93, 93, 89, 90, 96, 96,
+87, 83, 75, 77, 83, 89, 90, 90, 74, 78, 76, 76, 76, 84,
+94, 100, 89, 92, 94, 92, 90, 89, 90, 85, 84, 83, 83, 87,
+91, 92, 88, 92, 91, 88, 90, 97, 95,
+89, 83, 74, 77, 82, 84, 90, 92, 78, 72, 76, 75, 75, 81,
+95, 101, 95, 92, 95, 93, 90, 89, 90, 87, 86, 84, 86, 88,
+90, 90, 87, 90, 89, 90, 89, 98, 98,
+92, 84, 75, 76, 81, 81, 86, 91, 81, 72, 74, 74, 75, 81,
+104, 108, 93, 92, 95, 94, 88, 87, 89, 87, 85, 85, 88, 89,
+93, 91, 88, 88, 91, 88, 91, 106, 108,
+93, 89, 78, 75, 77, 80, 85, 86, 85, 73, 72, 73, 74, 79,
+102, 101, 88, 92, 93, 91, 87, 87, 86, 87, 85, 86, 88, 89,
+94, 94, 90, 88, 85, 86, 98, 109, 113,
+92, 93, 83, 76, 74, 79, 84, 85, 81, 75, 72, 73, 74, 79,
+105, 86, 86, 92, 96, 98, 104, 86, 85, 85, 85, 88, 90, 90,
+93, 92, 88, 87, 86, 89, 97, 110, 109,
+92, 93, 89, 78, 79, 78, 89, 84, 75, 76, 73, 72, 73, 78,
+105, 83, 82, 88, 83, 107, 95, 84, 85, 84, 86, 87, 90, 91,
+92, 90, 88, 87, 89, 90, 91, 99, 107,
+96, 94, 91, 82, 84, 86, 91, 87, 75, 74, 73, 73, 73, 77,
+101, 86, 83, 89, 92, 99, 98, 86, 86, 87, 83, 84, 89, 89,
+92, 92, 92, 96, 96, 87, 91, 90, 98,
+96, 97, 94, 87, 88, 89, 92, 90, 79, 72, 73, 73, 74, 77,
+100, 92, 84, 86, 98, 100, 92, 87, 88, 88, 84, 83, 87, 89,
+91, 94, 94, 96, 93, 87, 87, 84, 109,
+93, 92, 95, 92, 94, 93, 92, 91, 82, 72, 73, 74, 74, 76,
+95, 89, 85, 84, 102, 89, 85, 88, 94, 86, 82, 83, 82, 91,
+94, 97, 90, 92, 85, 90, 85, 79, 125,
+89, 96, 94, 90, 94, 95, 91, 91, 85, 76, 72, 73, 74, 75,
+88, 100, 83, 84, 84, 83, 85, 88, 90, 85, 84, 83, 84, 88,
+92, 93, 90, 89, 84, 90, 94, 79, 139,
+93, 97, 97, 93, 92, 95, 91, 90, 87, 81, 74, 73, 73, 74,
+85, 97, 95, 95, 89, 86, 86, 92, 87, 85, 84, 90, 86, 85,
+91, 87, 87, 86, 93, 124, 140, 106, 143,
+101, 95, 97, 97, 96, 95, 84, 88, 87, 82, 78, 73, 73, 74,
+82, 92, 104, 95, 88, 89, 87, 89, 86, 85, 86, 87, 87, 81,
+81, 83, 91, 106, 131, 153, 151, 123, 133,
+99, 101, 102, 99, 96, 90, 83, 82, 85, 84, 79, 76, 74, 74,
+78, 81, 89, 96, 90, 93, 88, 88, 86, 88, 89, 95, 89, 82,
+81, 85, 104, 118, 141, 160, 129, 137, 147,
+103, 104, 98, 99, 90, 88, 81, 76, 81, 83, 79, 77, 75, 75,
+75, 76, 80, 90, 94, 87, 86, 87, 92, 85, 85, 85, 87, 87,
+89, 91, 112, 115, 145, 154, 145, 141, 147,
+106, 103, 100, 99, 92, 82, 78, 75, 78, 81, 79, 77, 77, 78,
+78, 76, 77, 81, 89, 87, 84, 84, 90, 86, 85, 84, 80, 85,
+97, 104, 119, 119, 149, 147, 144, 146, 152,
+107, 105, 103, 100, 93, 83, 78, 74, 74, 79, 78, 77, 76, 78,
+80, 79, 76, 78, 83, 84, 81, 81, 84, 83, 82, 78, 78, 85,
+86, 97, 105, 114, 145, 146, 148, 147, 150,
+107, 105, 103, 97, 92, 84, 72, 72, 75, 77, 76, 75, 76, 79,
+80, 80, 77, 76, 82, 81, 80, 81, 80, 80, 80, 77, 74, 74,
+73, 77, 91, 110, 132, 141, 152, 152, 145,
+107, 105, 103, 96, 92, 86, 73, 71, 73, 75, 75, 76, 76, 78,
+80, 80, 80, 98, 80, 80, 82, 82, 80, 78, 76, 73, 71, 72,
+71, 74, 80, 108, 119, 136, 158, 142, 137,
+107, 104, 101, 97, 85, 87, 75, 70, 70, 74, 74, 75, 77, 78,
+80, 82, 110, 117, 110, 78, 81, 83, 81, 78, 76, 73, 71, 69,
+68, 71, 74, 95, 120, 138, 148, 143, 139
+};
+
+const size_t byte_array1_size = sizeof(byte_array1);
+
+const unsigned char byte_array2[YSIZE * XSIZE] =
+{
+77, 73, 76, 80, 79, 75, 82, 65, 62, 64, 59, 59, 61, 72,
+70, 67, 65, 70, 71, 70, 68, 66, 65, 67, 66, 66, 66, 66,
+66, 66, 66, 66, 66, 65, 63, 63, 62,
+75, 71, 71, 79, 81, 75, 81, 73, 59, 65, 60, 60, 64, 73,
+73, 68, 66, 70, 72, 71, 68, 66, 66, 67, 66, 66, 66, 67,
+67, 67, 66, 67, 66, 64, 63, 63, 63,
+76, 71, 66, 73, 81, 78, 80, 79, 59, 66, 60, 59, 62, 74,
+74, 71, 67, 70, 73, 71, 68, 66, 65, 65, 66, 66, 67, 67,
+67, 67, 67, 67, 66, 64, 64, 64, 64,
+76, 72, 64, 68, 79, 81, 80, 80, 59, 68, 60, 59, 60, 75,
+75, 73, 67, 68, 73, 72, 68, 66, 65, 63, 67, 67, 67, 67,
+68, 67, 67, 66, 65, 64, 65, 65, 65,
+79, 72, 63, 66, 73, 80, 83, 82, 60, 65, 61, 61, 60, 66,
+75, 75, 65, 70, 73, 72, 68, 66, 65, 64, 68, 67, 68, 68,
+68, 67, 67, 66, 65, 65, 65, 66, 65,
+81, 73, 62, 65, 72, 74, 82, 85, 66, 59, 62, 60, 60, 63,
+75, 76, 68, 69, 72, 72, 68, 66, 66, 65, 67, 68, 68, 68,
+68, 68, 66, 66, 64, 66, 65, 66, 66,
+84, 74, 64, 64, 70, 71, 78, 84, 70, 58, 60, 59, 59, 63,
+75, 80, 73, 67, 72, 72, 68, 66, 66, 65, 66, 68, 68, 68,
+68, 68, 66, 65, 65, 65, 66, 67, 68,
+87, 81, 66, 63, 65, 68, 76, 76, 75, 59, 58, 59, 59, 60,
+71, 92, 65, 64, 74, 72, 69, 67, 65, 65, 65, 68, 69, 68,
+69, 67, 65, 65, 65, 65, 67, 68, 69,
+86, 86, 73, 64, 62, 67, 75, 76, 70, 61, 58, 58, 59, 60,
+81, 68, 59, 63, 74, 90, 99, 67, 65, 65, 64, 67, 68, 68,
+68, 67, 65, 65, 66, 65, 66, 68, 68,
+85, 85, 80, 66, 67, 67, 81, 74, 62, 63, 59, 58, 58, 60,
+93, 61, 59, 59, 68, 115, 76, 67, 66, 64, 64, 66, 68, 68,
+68, 66, 65, 65, 66, 65, 64, 65, 69,
+90, 87, 83, 71, 74, 77, 83, 79, 63, 60, 59, 59, 58, 58,
+90, 61, 59, 59, 67, 80, 71, 68, 66, 64, 63, 63, 68, 68,
+68, 66, 65, 66, 67, 65, 64, 62, 87,
+91, 92, 86, 76, 78, 81, 85, 82, 67, 59, 59, 59, 59, 60,
+88, 72, 59, 60, 74, 80, 70, 67, 66, 64, 62, 60, 65, 68,
+67, 66, 65, 67, 66, 64, 62, 59, 111,
+84, 84, 87, 85, 87, 85, 84, 84, 72, 59, 59, 59, 59, 59,
+73, 71, 62, 59, 100, 70, 70, 67, 66, 64, 60, 58, 58, 67,
+68, 66, 65, 66, 64, 63, 59, 56, 131,
+80, 90, 87, 83, 88, 89, 84, 83, 76, 64, 59, 59, 59, 58,
+59, 97, 64, 62, 71, 68, 70, 73, 66, 63, 61, 58, 58, 62,
+67, 66, 64, 65, 63, 63, 61, 57, 149,
+86, 91, 92, 87, 85, 88, 83, 81, 78, 69, 61, 59, 59, 59,
+59, 61, 83, 72, 67, 67, 69, 69, 66, 64, 61, 72, 56, 57,
+64, 64, 64, 64, 65, 115, 150, 93, 151,
+97, 89, 91, 92, 89, 88, 74, 80, 78, 71, 65, 59, 58, 59,
+58, 59, 71, 72, 67, 70, 70, 69, 67, 64, 63, 66, 56, 54,
+57, 59, 64, 87, 139, 162, 160, 128, 141,
+94, 96, 97, 94, 89, 82, 71, 70, 76, 73, 67, 61, 59, 59,
+58, 59, 61, 71, 67, 75, 70, 68, 70, 65, 63, 63, 59, 56,
+54, 55, 90, 121, 149, 168, 138, 144, 157,
+99, 100, 93, 93, 82, 80, 70, 62, 70, 72, 67, 63, 60, 60,
+58, 58, 60, 68, 70, 70, 69, 68, 79, 68, 64, 62, 60, 59,
+57, 57, 88, 120, 151, 162, 154, 149, 155,
+103, 99, 95, 94, 84, 73, 67, 62, 65, 69, 67, 64, 63, 64,
+63, 59, 60, 65, 71, 69, 69, 67, 78, 65, 63, 61, 59, 61,
+60, 68, 100, 128, 155, 155, 152, 155, 164,
+104, 102, 99, 95, 86, 74, 67, 61, 61, 66, 65, 63, 63, 64,
+65, 63, 60, 63, 70, 69, 67, 67, 67, 65, 62, 60, 58, 57,
+62, 58, 71, 117, 150, 154, 157, 155, 163,
+104, 101, 99, 91, 84, 74, 59, 59, 62, 64, 63, 61, 62, 64,
+64, 64, 61, 60, 69, 68, 67, 69, 67, 65, 62, 59, 58, 57,
+57, 56, 59, 104, 137, 147, 159, 161, 158,
+104, 101, 99, 90, 85, 77, 60, 57, 60, 62, 62, 62, 63, 64,
+65, 65, 66, 100, 67, 67, 69, 69, 67, 65, 63, 60, 58, 56,
+54, 55, 56, 77, 122, 142, 166, 157, 150,
+104, 101, 97, 92, 77, 79, 64, 57, 57, 62, 62, 62, 64, 65,
+66, 65, 115, 138, 129, 64, 68, 70, 68, 66, 64, 60, 58, 56,
+53, 53, 56, 62, 115, 143, 157, 156, 159
+};
+
+const size_t byte_array2_size = sizeof(byte_array2);
+
+const unsigned char byte_array3[YSIZE * XSIZE] =
+{
+211, 221, 216, 201, 205, 216, 195, 236, 244, 237, 250, 250, 248, 218,
+223, 232, 236, 224, 221, 221, 227, 231, 232, 227, 229, 227, 227, 225,
+227, 225, 226, 226, 226, 228, 234, 234, 234, 216, 226, 228, 205, 200,
+214, 198, 215, 250, 233, 247, 250, 242, 219, 220, 229, 235, 225, 217,
+220, 227, 232, 230, 228, 229, 228, 227, 224, 225, 223, 226, 225, 226,
+230, 233, 233, 234, 213, 227, 237, 220, 200, 204, 202, 201, 248, 231,
+246, 250, 245, 214, 215, 223, 232, 225, 218, 218, 225, 230, 232, 231,
+229, 227, 225, 224, 223, 226, 224, 225, 228, 229, 230, 232, 231, 215,
+223, 242, 233, 206, 200, 201, 197, 250, 227, 250, 249, 248, 211, 212,
+216, 233, 229, 216, 218, 225, 230, 232, 237, 226, 224, 224, 223, 225,
+225, 224, 225, 228, 229, 231, 229, 231, 208, 220, 247, 238, 221, 202,
+194, 194, 245, 237, 247, 247, 249, 234, 210, 212, 237, 222, 219, 217,
+226, 229, 232, 235, 222, 222, 223, 223, 223, 224, 224, 227, 226, 229,
+229, 228, 231, 200, 221, 247, 239, 224, 217, 196, 189, 229, 248, 245,
+248, 250, 241, 210, 210, 230, 225, 218, 218, 224, 230, 230, 229, 224,
+222, 222, 222, 222, 223, 225, 226, 231, 226, 228, 229, 230, 191, 216,
+246, 245, 226, 228, 207, 191, 221, 251, 248, 249, 251, 245, 214, 214,
+233, 229, 217, 217, 224, 229, 230, 229, 225, 220, 223, 221, 222, 224,
+224, 227, 230, 227, 226, 229, 230, 187, 199, 238, 248, 242, 231, 213,
+211, 209, 246, 248, 251, 251, 250, 226, 215, 236, 237, 217, 215, 222,
+226, 229, 229, 227, 222, 222, 223, 222, 225, 227, 228, 226, 227, 228,
+228, 230, 188, 189, 221, 243, 247, 237, 215, 209, 223, 241, 248, 248,
+250, 248, 228, 234, 251, 239, 219, 210, 205, 224, 229, 228, 230, 221,
+223, 223, 222, 226, 229, 228, 224, 227, 229, 230, 232, 190, 190, 201,
+235, 236, 238, 198, 214, 243, 238, 248, 248, 250, 249, 215, 244, 250,
+250, 240, 168, 220, 224, 228, 230, 231, 226, 221, 224, 223, 226, 230,
+227, 226, 226, 230, 233, 234, 179, 185, 195, 224, 215, 210, 195, 204,
+239, 245, 250, 250, 252, 254, 216, 243, 249, 249, 233, 210, 215, 223,
+227, 230, 234, 234, 224, 223, 223, 227, 230, 226, 226, 228, 231, 235,
+212, 178, 174, 190, 211, 207, 199, 189, 194, 230, 250, 250, 250, 253,
+253, 222, 225, 250, 248, 218, 216, 217, 225, 226, 232, 239, 242, 229,
+223, 224, 229, 230, 225, 228, 230, 236, 241, 183, 194, 194, 185, 190,
+185, 190, 191, 191, 219, 250, 251, 250, 253, 254, 241, 225, 246, 249,
+198, 217, 220, 224, 225, 234, 241, 242, 246, 224, 223, 227, 229, 227,
+228, 234, 237, 245, 149, 203, 178, 182, 193, 185, 179, 191, 194, 211,
+236, 252, 252, 254, 254, 253, 192, 240, 244, 235, 224, 220, 229, 224,
+236, 239, 243, 244, 236, 224, 229, 230, 229, 231, 230, 233, 244, 128,
+188, 177, 171, 184, 191, 182, 196, 197, 208, 224, 247, 253, 255, 252,
+250, 248, 226, 216, 228, 230, 220, 220, 227, 234, 237, 231, 247, 244,
+231, 231, 229, 228, 229, 182, 128, 196, 118, 160, 182, 174, 172, 179,
+183, 216, 203, 206, 220, 236, 253, 254, 253, 253, 249, 225, 219, 232,
+230, 220, 224, 227, 233, 237, 234, 244, 250, 245, 240, 224, 212, 174,
+123, 124, 176, 127, 171, 163, 161, 167, 177, 198, 221, 228, 212, 215,
+233, 245, 252, 255, 253, 252, 251, 223, 231, 216, 222, 227, 231, 231,
+234, 227, 238, 245, 249, 244, 210, 177, 124, 129, 134, 124, 113, 156,
+155, 172, 168, 197, 201, 224, 247, 224, 219, 233, 242, 249, 250, 252,
+254, 252, 230, 230, 224, 224, 225, 225, 227, 232, 232, 235, 239, 239,
+241, 213, 178, 131, 128, 128, 120, 114, 149, 157, 165, 168, 191, 218,
+231, 246, 237, 226, 234, 241, 243, 239, 244, 252, 249, 237, 225, 226,
+224, 227, 220, 229, 235, 235, 239, 238, 236, 230, 204, 177, 125, 131,
+127, 117, 111, 146, 151, 158, 166, 187, 215, 230, 246, 246, 231, 238,
+243, 246, 243, 241, 244, 253, 245, 226, 226, 229, 229, 229, 231, 236,
+238, 241, 240, 241, 235, 224, 188, 134, 123, 127, 116, 116, 144, 151,
+158, 173, 190, 214, 251, 250, 243, 236, 242, 249, 246, 241, 241, 244,
+251, 251, 228, 230, 230, 226, 232, 231, 236, 241, 243, 244, 243, 243,
+235, 200, 150, 128, 122, 119, 117, 144, 151, 156, 176, 190, 207, 246,
+253, 244, 239, 244, 246, 244, 242, 240, 243, 249, 198, 239, 234, 226,
+226, 228, 234, 238, 241, 244, 245, 247, 250, 244, 219, 182, 138, 118,
+118, 116, 143, 150, 162, 173, 208, 205, 238, 253, 251, 241, 244, 244,
+242, 243, 238, 246, 193, 146, 173, 246, 231, 223, 230, 232, 236, 240,
+245, 247, 252, 252, 245, 233, 195, 138, 114, 118, 108
+};
+
+const size_t byte_array3_size = sizeof(byte_array3);
+
+const float array_float1[YSIZE * XSIZE] =
+{
+234.866, 229.404, 234.866, 245.790, 243.059, 232.135, 245.790, 213.018,
+210.287, 215.749, 204.825, 210.287, 215.749, 234.866, 237.597, 226.673,
+223.942, 237.597, 243.059, 240.328, 234.866, 237.597, 240.328, 237.597,
+221.211, 229.404, 232.135, 232.135, 229.404, 234.866, 240.328, 248.521,
+262.176, 259.445, 264.907, 259.445, 243.059,
+232.135, 223.942, 221.211, 240.328, 243.059, 232.135, 243.059, 226.673,
+202.094, 215.749, 207.556, 210.287, 218.480, 237.597, 237.597, 229.404,
+229.404, 240.328, 245.790, 243.059, 237.597, 232.135, 237.597, 240.328,
+226.673, 218.480, 223.942, 229.404, 232.135, 237.597, 245.790, 259.445,
+262.176, 259.445, 259.445, 251.252, 245.790,
+232.135, 221.211, 215.749, 229.404, 245.790, 237.597, 240.328, 240.328,
+199.363, 215.749, 204.825, 207.556, 215.749, 240.328, 240.328, 237.597,
+232.135, 245.790, 251.252, 243.059, 240.328, 240.328, 237.597, 234.866,
+229.404, 223.942, 223.942, 226.673, 237.597, 243.059, 253.983, 256.714,
+253.983, 253.983, 251.252, 251.252, 262.176,
+232.135, 223.942, 207.556, 218.480, 240.328, 243.059, 240.328, 243.059,
+199.363, 218.480, 204.825, 204.825, 210.287, 243.059, 251.252, 253.983,
+248.521, 243.059, 256.714, 251.252, 245.790, 243.059, 240.328, 229.404,
+229.404, 223.942, 223.942, 232.135, 240.328, 248.521, 256.714, 253.983,
+253.983, 243.059, 245.790, 262.176, 262.176,
+237.597, 226.673, 204.825, 210.287, 226.673, 243.059, 245.790, 245.790,
+202.094, 213.018, 207.556, 207.556, 207.556, 229.404, 256.714, 273.100,
+243.059, 251.252, 256.714, 251.252, 245.790, 243.059, 245.790, 232.135,
+229.404, 226.673, 226.673, 237.597, 248.521, 251.252, 240.328, 251.252,
+248.521, 240.328, 245.790, 264.907, 259.445,
+243.059, 226.673, 202.094, 210.287, 223.942, 229.404, 245.790, 251.252,
+213.018, 196.632, 207.556, 204.825, 204.825, 221.211, 259.445, 275.831,
+259.445, 251.252, 259.445, 253.983, 245.790, 243.059, 245.790, 237.597,
+234.866, 229.404, 234.866, 240.328, 245.790, 245.790, 237.597, 245.790,
+243.059, 245.790, 243.059, 267.638, 267.638,
+251.252, 229.404, 204.825, 207.556, 221.211, 221.211, 234.866, 248.521,
+221.211, 196.632, 202.094, 202.094, 204.825, 221.211, 284.024, 294.948,
+253.983, 251.252, 259.445, 256.714, 240.328, 237.597, 243.059, 237.597,
+232.135, 232.135, 240.328, 243.059, 253.983, 248.521, 240.328, 240.328,
+248.521, 240.328, 248.521, 289.486, 294.948,
+253.983, 243.059, 213.018, 204.825, 210.287, 218.480, 232.135, 234.866,
+232.135, 199.363, 196.632, 199.363, 202.094, 215.749, 278.562, 275.831,
+240.328, 251.252, 253.983, 248.521, 237.597, 237.597, 234.866, 237.597,
+232.135, 234.866, 240.328, 243.059, 256.714, 256.714, 245.790, 240.328,
+232.135, 234.866, 267.638, 297.679, 308.603,
+251.252, 253.983, 226.673, 207.556, 202.094, 215.749, 229.404, 232.135,
+221.211, 204.825, 196.632, 199.363, 202.094, 215.749, 286.755, 234.866,
+234.866, 251.252, 262.176, 267.638, 284.024, 234.866, 232.135, 232.135,
+232.135, 240.328, 245.790, 245.790, 253.983, 251.252, 240.328, 237.597,
+234.866, 243.059, 264.907, 300.410, 297.679,
+251.252, 253.983, 243.059, 213.018, 215.749, 213.018, 243.059, 229.404,
+204.825, 207.556, 199.363, 196.632, 199.363, 213.018, 286.755, 226.673,
+223.942, 240.328, 226.673, 292.217, 259.445, 229.404, 232.135, 229.404,
+234.866, 237.597, 245.790, 248.521, 251.252, 245.790, 240.328, 237.597,
+243.059, 245.790, 248.521, 270.369, 292.217,
+262.176, 256.714, 248.521, 223.942, 229.404, 234.866, 248.521, 237.597,
+204.825, 202.094, 199.363, 199.363, 199.363, 210.287, 275.831, 234.866,
+226.673, 243.059, 251.252, 270.369, 267.638, 234.866, 234.866, 237.597,
+226.673, 229.404, 243.059, 243.059, 251.252, 251.252, 251.252, 262.176,
+262.176, 237.597, 248.521, 245.790, 267.638,
+262.176, 264.907, 256.714, 237.597, 240.328, 243.059, 251.252, 245.790,
+215.749, 196.632, 199.363, 199.363, 202.094, 210.287, 273.100, 251.252,
+229.404, 234.866, 267.638, 273.100, 251.252, 237.597, 240.328, 240.328,
+229.404, 226.673, 237.597, 243.059, 248.521, 256.714, 256.714, 262.176,
+253.983, 237.597, 237.597, 229.404, 297.679,
+253.983, 251.252, 259.445, 251.252, 256.714, 253.983, 251.252, 248.521,
+223.942, 196.632, 199.363, 202.094, 202.094, 207.556, 259.445, 243.059,
+232.135, 229.404, 278.562, 243.059, 232.135, 240.328, 256.714, 234.866,
+223.942, 226.673, 223.942, 248.521, 256.714, 264.907, 245.790, 251.252,
+232.135, 245.790, 232.135, 215.749, 341.375,
+243.059, 262.176, 256.714, 245.790, 256.714, 259.445, 248.521, 248.521,
+232.135, 207.556, 196.632, 199.363, 202.094, 204.825, 240.328, 273.100,
+226.673, 229.404, 229.404, 226.673, 232.135, 240.328, 245.790, 232.135,
+229.404, 226.673, 229.404, 240.328, 251.252, 253.983, 245.790, 243.059,
+229.404, 245.790, 256.714, 215.749, 379.609,
+253.983, 264.907, 264.907, 253.983, 251.252, 259.445, 248.521, 245.790,
+237.597, 221.211, 202.094, 199.363, 199.363, 202.094, 232.135, 264.907,
+259.445, 259.445, 243.059, 234.866, 234.866, 251.252, 237.597, 232.135,
+229.404, 245.790, 234.866, 232.135, 248.521, 237.597, 237.597, 234.866,
+253.983, 338.644, 382.340, 289.486, 390.533,
+275.831, 259.445, 264.907, 264.907, 262.176, 259.445, 229.404, 240.328,
+237.597, 223.942, 213.018, 199.363, 199.363, 202.094, 223.942, 251.252,
+284.024, 259.445, 240.328, 243.059, 237.597, 243.059, 234.866, 232.135,
+234.866, 237.597, 237.597, 221.211, 221.211, 226.673, 248.521, 289.486,
+357.761, 417.843, 412.381, 335.913, 363.223,
+270.369, 275.831, 278.562, 270.369, 262.176, 245.790, 226.673, 223.942,
+232.135, 229.404, 215.749, 207.556, 202.094, 202.094, 213.018, 221.211,
+243.059, 262.176, 245.790, 253.983, 240.328, 240.328, 234.866, 240.328,
+243.059, 259.445, 243.059, 223.942, 221.211, 232.135, 284.024, 322.258,
+385.071, 436.960, 352.299, 374.147, 401.457,
+281.293, 284.024, 267.638, 270.369, 245.790, 240.328, 221.211, 207.556,
+221.211, 226.673, 215.749, 210.287, 204.825, 204.825, 204.825, 207.556,
+218.480, 245.790, 256.714, 237.597, 234.866, 237.597, 251.252, 232.135,
+232.135, 232.135, 237.597, 237.597, 243.059, 248.521, 305.872, 314.065,
+395.995, 420.574, 395.995, 385.071, 401.457,
+289.486, 281.293, 273.100, 270.369, 251.252, 223.942, 213.018, 204.825,
+213.018, 221.211, 215.749, 210.287, 210.287, 213.018, 213.018, 207.556,
+210.287, 221.211, 243.059, 237.597, 229.404, 229.404, 245.790, 234.866,
+232.135, 229.404, 218.480, 232.135, 264.907, 284.024, 324.989, 324.989,
+406.919, 401.457, 393.264, 398.726, 415.112,
+292.217, 286.755, 281.293, 273.100, 253.983, 226.673, 213.018, 202.094,
+202.094, 215.749, 213.018, 210.287, 207.556, 213.018, 218.480, 215.749,
+207.556, 213.018, 226.673, 229.404, 221.211, 221.211, 229.404, 226.673,
+223.942, 213.018, 213.018, 232.135, 234.866, 264.907, 286.755, 311.334,
+395.995, 398.726, 404.188, 401.457, 409.650,
+292.217, 286.755, 281.293, 264.907, 251.252, 229.404, 196.632, 196.632,
+204.825, 210.287, 207.556, 204.825, 207.556, 215.749, 218.480, 218.480,
+210.287, 207.556, 223.942, 221.211, 218.480, 221.211, 218.480, 218.480,
+218.480, 210.287, 202.094, 202.094, 199.363, 210.287, 248.521, 300.410,
+360.492, 385.071, 415.112, 415.112, 395.995,
+292.217, 286.755, 281.293, 262.176, 251.252, 234.866, 199.363, 193.901,
+199.363, 204.825, 204.825, 207.556, 207.556, 213.018, 218.480, 218.480,
+218.480, 267.638, 218.480, 218.480, 223.942, 223.942, 218.480, 213.018,
+207.556, 199.363, 193.901, 196.632, 193.901, 202.094, 218.480, 294.948,
+324.989, 371.416, 431.498, 387.802, 374.147,
+292.217, 284.024, 275.831, 264.907, 232.135, 237.597, 204.825, 191.170,
+191.170, 202.094, 202.094, 204.825, 210.287, 213.018, 218.480, 223.942,
+300.410, 319.527, 300.410, 213.018, 221.211, 226.673, 221.211, 213.018,
+207.556, 199.363, 193.901, 188.439, 185.708, 193.901, 202.094, 259.445,
+327.720, 376.878, 404.188, 390.533, 379.609
+};
+
+const size_t array_float1_size = sizeof(array_float1);
+
+const float array_float2[YSIZE * XSIZE] =
+{
+210.287, 199.363, 207.556, 218.480, 215.749, 204.825, 223.942, 177.515,
+169.322, 174.784, 161.129, 161.129, 166.591, 196.632, 191.170, 182.977,
+177.515, 191.170, 193.901, 191.170, 185.708, 180.246, 177.515, 182.977,
+180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246, 180.246,
+180.246, 177.515, 172.053, 172.053, 169.322,
+204.825, 193.901, 193.901, 215.749, 221.211, 204.825, 221.211, 199.363,
+161.129, 177.515, 163.860, 163.860, 174.784, 199.363, 199.363, 185.708,
+180.246, 191.170, 196.632, 193.901, 185.708, 180.246, 180.246, 182.977,
+180.246, 180.246, 180.246, 182.977, 182.977, 182.977, 180.246, 182.977,
+180.246, 174.784, 172.053, 172.053, 172.053,
+207.556, 193.901, 180.246, 199.363, 221.211, 213.018, 218.480, 215.749,
+161.129, 180.246, 163.860, 161.129, 169.322, 202.094, 202.094, 193.901,
+182.977, 191.170, 199.363, 193.901, 185.708, 180.246, 177.515, 177.515,
+180.246, 180.246, 182.977, 182.977, 182.977, 182.977, 182.977, 182.977,
+180.246, 174.784, 174.784, 174.784, 174.784,
+207.556, 196.632, 174.784, 185.708, 215.749, 221.211, 218.480, 218.480,
+161.129, 185.708, 163.860, 161.129, 163.860, 204.825, 204.825, 199.363,
+182.977, 185.708, 199.363, 196.632, 185.708, 180.246, 177.515, 172.053,
+182.977, 182.977, 182.977, 182.977, 185.708, 182.977, 182.977, 180.246,
+177.515, 174.784, 177.515, 177.515, 177.515,
+215.749, 196.632, 172.053, 180.246, 199.363, 218.480, 226.673, 223.942,
+163.860, 177.515, 166.591, 166.591, 163.860, 180.246, 204.825, 204.825,
+177.515, 191.170, 199.363, 196.632, 185.708, 180.246, 177.515, 174.784,
+185.708, 182.977, 185.708, 185.708, 185.708, 182.977, 182.977, 180.246,
+177.515, 177.515, 177.515, 180.246, 177.515,
+221.211, 199.363, 169.322, 177.515, 196.632, 202.094, 223.942, 232.135,
+180.246, 161.129, 169.322, 163.860, 163.860, 172.053, 204.825, 207.556,
+185.708, 188.439, 196.632, 196.632, 185.708, 180.246, 180.246, 177.515,
+182.977, 185.708, 185.708, 185.708, 185.708, 185.708, 180.246, 180.246,
+174.784, 180.246, 177.515, 180.246, 180.246,
+229.404, 202.094, 174.784, 174.784, 191.170, 193.901, 213.018, 229.404,
+191.170, 158.398, 163.860, 161.129, 161.129, 172.053, 204.825, 218.480,
+199.363, 182.977, 196.632, 196.632, 185.708, 180.246, 180.246, 177.515,
+180.246, 185.708, 185.708, 185.708, 185.708, 185.708, 180.246, 177.515,
+177.515, 177.515, 180.246, 182.977, 185.708,
+237.597, 221.211, 180.246, 172.053, 177.515, 185.708, 207.556, 207.556,
+204.825, 161.129, 158.398, 161.129, 161.129, 163.860, 193.901, 251.252,
+177.515, 174.784, 202.094, 196.632, 188.439, 182.977, 177.515, 177.515,
+177.515, 185.708, 188.439, 185.708, 188.439, 182.977, 177.515, 177.515,
+177.515, 177.515, 182.977, 185.708, 188.439,
+234.866, 234.866, 199.363, 174.784, 169.322, 182.977, 204.825, 207.556,
+191.170, 166.591, 158.398, 158.398, 161.129, 163.860, 221.211, 185.708,
+161.129, 172.053, 202.094, 245.790, 270.369, 182.977, 177.515, 177.515,
+174.784, 182.977, 185.708, 185.708, 185.708, 182.977, 177.515, 177.515,
+180.246, 177.515, 180.246, 185.708, 185.708,
+232.135, 232.135, 218.480, 180.246, 182.977, 182.977, 221.211, 202.094,
+169.322, 172.053, 161.129, 158.398, 158.398, 163.860, 253.983, 166.591,
+161.129, 161.129, 185.708, 314.065, 207.556, 182.977, 180.246, 174.784,
+174.784, 180.246, 185.708, 185.708, 185.708, 180.246, 177.515, 177.515,
+180.246, 177.515, 174.784, 177.515, 188.439,
+245.790, 237.597, 226.673, 193.901, 202.094, 210.287, 226.673, 215.749,
+172.053, 163.860, 161.129, 161.129, 158.398, 158.398, 245.790, 166.591,
+161.129, 161.129, 182.977, 218.480, 193.901, 185.708, 180.246, 174.784,
+172.053, 172.053, 185.708, 185.708, 185.708, 180.246, 177.515, 180.246,
+182.977, 177.515, 174.784, 169.322, 237.597,
+248.521, 251.252, 234.866, 207.556, 213.018, 221.211, 232.135, 223.942,
+182.977, 161.129, 161.129, 161.129, 161.129, 163.860, 240.328, 196.632,
+161.129, 163.860, 202.094, 218.480, 191.170, 182.977, 180.246, 174.784,
+169.322, 163.860, 177.515, 185.708, 182.977, 180.246, 177.515, 182.977,
+180.246, 174.784, 169.322, 161.129, 303.141,
+229.404, 229.404, 237.597, 232.135, 237.597, 232.135, 229.404, 229.404,
+196.632, 161.129, 161.129, 161.129, 161.129, 161.129, 199.363, 193.901,
+169.322, 161.129, 273.100, 191.170, 191.170, 182.977, 180.246, 174.784,
+163.860, 158.398, 158.398, 182.977, 185.708, 180.246, 177.515, 180.246,
+174.784, 172.053, 161.129, 152.936, 357.761,
+218.480, 245.790, 237.597, 226.673, 240.328, 243.059, 229.404, 226.673,
+207.556, 174.784, 161.129, 161.129, 161.129, 158.398, 161.129, 264.907,
+174.784, 169.322, 193.901, 185.708, 191.170, 199.363, 180.246, 172.053,
+166.591, 158.398, 158.398, 169.322, 182.977, 180.246, 174.784, 177.515,
+172.053, 172.053, 166.591, 155.667, 406.919,
+234.866, 248.521, 251.252, 237.597, 232.135, 240.328, 226.673, 221.211,
+213.018, 188.439, 166.591, 161.129, 161.129, 161.129, 161.129, 166.591,
+226.673, 196.632, 182.977, 182.977, 188.439, 188.439, 180.246, 174.784,
+166.591, 196.632, 152.936, 155.667, 174.784, 174.784, 174.784, 174.784,
+177.515, 314.065, 409.650, 253.983, 412.381,
+264.907, 243.059, 248.521, 251.252, 243.059, 240.328, 202.094, 218.480,
+213.018, 193.901, 177.515, 161.129, 158.398, 161.129, 158.398, 161.129,
+193.901, 196.632, 182.977, 191.170, 191.170, 188.439, 182.977, 174.784,
+172.053, 180.246, 152.936, 147.474, 155.667, 161.129, 174.784, 237.597,
+379.609, 442.422, 436.960, 349.568, 385.071,
+256.714, 262.176, 264.907, 256.714, 243.059, 223.942, 193.901, 191.170,
+207.556, 199.363, 182.977, 166.591, 161.129, 161.129, 158.398, 161.129,
+166.591, 193.901, 182.977, 204.825, 191.170, 185.708, 191.170, 177.515,
+172.053, 172.053, 161.129, 152.936, 147.474, 150.205, 245.790, 330.451,
+406.919, 458.808, 376.878, 393.264, 428.767,
+270.369, 273.100, 253.983, 253.983, 223.942, 218.480, 191.170, 169.322,
+191.170, 196.632, 182.977, 172.053, 163.860, 163.860, 158.398, 158.398,
+163.860, 185.708, 191.170, 191.170, 188.439, 185.708, 215.749, 185.708,
+174.784, 169.322, 163.860, 161.129, 155.667, 155.667, 240.328, 327.720,
+412.381, 442.422, 420.574, 406.919, 423.305,
+281.293, 270.369, 259.445, 256.714, 229.404, 199.363, 182.977, 169.322,
+177.515, 188.439, 182.977, 174.784, 172.053, 174.784, 172.053, 161.129,
+163.860, 177.515, 193.901, 188.439, 188.439, 182.977, 213.018, 177.515,
+172.053, 166.591, 161.129, 166.591, 163.860, 185.708, 273.100, 349.568,
+423.305, 423.305, 415.112, 423.305, 447.884,
+284.024, 278.562, 270.369, 259.445, 234.866, 202.094, 182.977, 166.591,
+166.591, 180.246, 177.515, 172.053, 172.053, 174.784, 177.515, 172.053,
+163.860, 172.053, 191.170, 188.439, 182.977, 182.977, 182.977, 177.515,
+169.322, 163.860, 158.398, 155.667, 169.322, 158.398, 193.901, 319.527,
+409.650, 420.574, 428.767, 423.305, 445.153,
+284.024, 275.831, 270.369, 248.521, 229.404, 202.094, 161.129, 161.129,
+169.322, 174.784, 172.053, 166.591, 169.322, 174.784, 174.784, 174.784,
+166.591, 163.860, 188.439, 185.708, 182.977, 188.439, 182.977, 177.515,
+169.322, 161.129, 158.398, 155.667, 155.667, 152.936, 161.129, 284.024,
+374.147, 401.457, 434.229, 439.691, 431.498,
+284.024, 275.831, 270.369, 245.790, 232.135, 210.287, 163.860, 155.667,
+163.860, 169.322, 169.322, 169.322, 172.053, 174.784, 177.515, 177.515,
+180.246, 273.100, 182.977, 182.977, 188.439, 188.439, 182.977, 177.515,
+172.053, 163.860, 158.398, 152.936, 147.474, 150.205, 152.936, 210.287,
+333.182, 387.802, 453.346, 428.767, 409.650,
+284.024, 275.831, 264.907, 251.252, 210.287, 215.749, 174.784, 155.667,
+155.667, 169.322, 169.322, 169.322, 174.784, 177.515, 180.246, 177.515,
+314.065, 376.878, 352.299, 174.784, 185.708, 191.170, 185.708, 180.246,
+174.784, 163.860, 158.398, 152.936, 144.743, 144.743, 152.936, 169.322,
+314.065, 390.533, 428.767, 426.036, 434.229
+};
+
+const size_t array_float2_size = sizeof(array_float2);
+
+const double array_double1[YSIZE * XSIZE] =
+{
+148.914762, 145.451628, 148.914762, 155.841030, 154.109463, 147.183195,
+155.841030, 135.062226, 133.330659, 136.793793, 129.867525, 133.330659,
+136.793793, 148.914762, 150.646329, 143.720061, 141.988494, 150.646329,
+154.109463, 152.377896, 148.914762, 150.646329, 152.377896, 150.646329,
+140.256927, 145.451628, 147.183195, 147.183195, 145.451628, 148.914762,
+152.377896, 157.572597, 166.230432, 164.498865, 167.961999, 164.498865,
+154.109463,
+147.183195, 141.988494, 140.256927, 152.377896, 154.109463, 147.183195,
+154.109463, 143.720061, 128.135958, 136.793793, 131.599092, 133.330659,
+138.525360, 150.646329, 150.646329, 145.451628, 145.451628, 152.377896,
+155.841030, 154.109463, 150.646329, 147.183195, 150.646329, 152.377896,
+143.720061, 138.525360, 141.988494, 145.451628, 147.183195, 150.646329,
+155.841030, 164.498865, 166.230432, 164.498865, 164.498865, 159.304164,
+155.841030,
+147.183195, 140.256927, 136.793793, 145.451628, 155.841030, 150.646329,
+152.377896, 152.377896, 126.404391, 136.793793, 129.867525, 131.599092,
+136.793793, 152.377896, 152.377896, 150.646329, 147.183195, 155.841030,
+159.304164, 154.109463, 152.377896, 152.377896, 150.646329, 148.914762,
+145.451628, 141.988494, 141.988494, 143.720061, 150.646329, 154.109463,
+161.035731, 162.767298, 161.035731, 161.035731, 159.304164, 159.304164,
+166.230432,
+147.183195, 141.988494, 131.599092, 138.525360, 152.377896, 154.109463,
+152.377896, 154.109463, 126.404391, 138.525360, 129.867525, 129.867525,
+133.330659, 154.109463, 159.304164, 161.035731, 157.572597, 154.109463,
+162.767298, 159.304164, 155.841030, 154.109463, 152.377896, 145.451628,
+145.451628, 141.988494, 141.988494, 147.183195, 152.377896, 157.572597,
+162.767298, 161.035731, 161.035731, 154.109463, 155.841030, 166.230432,
+166.230432,
+150.646329, 143.720061, 129.867525, 133.330659, 143.720061, 154.109463,
+155.841030, 155.841030, 128.135958, 135.062226, 131.599092, 131.599092,
+131.599092, 145.451628, 162.767298, 173.156700, 154.109463, 159.304164,
+162.767298, 159.304164, 155.841030, 154.109463, 155.841030, 147.183195,
+145.451628, 143.720061, 143.720061, 150.646329, 157.572597, 159.304164,
+152.377896, 159.304164, 157.572597, 152.377896, 155.841030, 167.961999,
+164.498865,
+154.109463, 143.720061, 128.135958, 133.330659, 141.988494, 145.451628,
+155.841030, 159.304164, 135.062226, 124.672824, 131.599092, 129.867525,
+129.867525, 140.256927, 164.498865, 174.888267, 164.498865, 159.304164,
+164.498865, 161.035731, 155.841030, 154.109463, 155.841030, 150.646329,
+148.914762, 145.451628, 148.914762, 152.377896, 155.841030, 155.841030,
+150.646329, 155.841030, 154.109463, 155.841030, 154.109463, 169.693566,
+169.693566,
+159.304164, 145.451628, 129.867525, 131.599092, 140.256927, 140.256927,
+148.914762, 157.572597, 140.256927, 124.672824, 128.135958, 128.135958,
+129.867525, 140.256927, 180.082968, 187.009236, 161.035731, 159.304164,
+164.498865, 162.767298, 152.377896, 150.646329, 154.109463, 150.646329,
+147.183195, 147.183195, 152.377896, 154.109463, 161.035731, 157.572597,
+152.377896, 152.377896, 157.572597, 152.377896, 157.572597, 183.546102,
+187.009236,
+161.035731, 154.109463, 135.062226, 129.867525, 133.330659, 138.525360,
+147.183195, 148.914762, 147.183195, 126.404391, 124.672824, 126.404391,
+128.135958, 136.793793, 176.619834, 174.888267, 152.377896, 159.304164,
+161.035731, 157.572597, 150.646329, 150.646329, 148.914762, 150.646329,
+147.183195, 148.914762, 152.377896, 154.109463, 162.767298, 162.767298,
+155.841030, 152.377896, 147.183195, 148.914762, 169.693566, 188.740803,
+195.667071,
+159.304164, 161.035731, 143.720061, 131.599092, 128.135958, 136.793793,
+145.451628, 147.183195, 140.256927, 129.867525, 124.672824, 126.404391,
+128.135958, 136.793793, 181.814535, 148.914762, 148.914762, 159.304164,
+166.230432, 169.693566, 180.082968, 148.914762, 147.183195, 147.183195,
+147.183195, 152.377896, 155.841030, 155.841030, 161.035731, 159.304164,
+152.377896, 150.646329, 148.914762, 154.109463, 167.961999, 190.472370,
+188.740803,
+159.304164, 161.035731, 154.109463, 135.062226, 136.793793, 135.062226,
+154.109463, 145.451628, 129.867525, 131.599092, 126.404391, 124.672824,
+126.404391, 135.062226, 181.814535, 143.720061, 141.988494, 152.377896,
+143.720061, 185.277669, 164.498865, 145.451628, 147.183195, 145.451628,
+148.914762, 150.646329, 155.841030, 157.572597, 159.304164, 155.841030,
+152.377896, 150.646329, 154.109463, 155.841030, 157.572597, 171.425133,
+185.277669,
+166.230432, 162.767298, 157.572597, 141.988494, 145.451628, 148.914762,
+157.572597, 150.646329, 129.867525, 128.135958, 126.404391, 126.404391,
+126.404391, 133.330659, 174.888267, 148.914762, 143.720061, 154.109463,
+159.304164, 171.425133, 169.693566, 148.914762, 148.914762, 150.646329,
+143.720061, 145.451628, 154.109463, 154.109463, 159.304164, 159.304164,
+159.304164, 166.230432, 166.230432, 150.646329, 157.572597, 155.841030,
+169.693566,
+166.230432, 167.961999, 162.767298, 150.646329, 152.377896, 154.109463,
+159.304164, 155.841030, 136.793793, 124.672824, 126.404391, 126.404391,
+128.135958, 133.330659, 173.156700, 159.304164, 145.451628, 148.914762,
+169.693566, 173.156700, 159.304164, 150.646329, 152.377896, 152.377896,
+145.451628, 143.720061, 150.646329, 154.109463, 157.572597, 162.767298,
+162.767298, 166.230432, 161.035731, 150.646329, 150.646329, 145.451628,
+188.740803,
+161.035731, 159.304164, 164.498865, 159.304164, 162.767298, 161.035731,
+159.304164, 157.572597, 141.988494, 124.672824, 126.404391, 128.135958,
+128.135958, 131.599092, 164.498865, 154.109463, 147.183195, 145.451628,
+176.619834, 154.109463, 147.183195, 152.377896, 162.767298, 148.914762,
+141.988494, 143.720061, 141.988494, 157.572597, 162.767298, 167.961999,
+155.841030, 159.304164, 147.183195, 155.841030, 147.183195, 136.793793,
+216.445875,
+154.109463, 166.230432, 162.767298, 155.841030, 162.767298, 164.498865,
+157.572597, 157.572597, 147.183195, 131.599092, 124.672824, 126.404391,
+128.135958, 129.867525, 152.377896, 173.156700, 143.720061, 145.451628,
+145.451628, 143.720061, 147.183195, 152.377896, 155.841030, 147.183195,
+145.451628, 143.720061, 145.451628, 152.377896, 159.304164, 161.035731,
+155.841030, 154.109463, 145.451628, 155.841030, 162.767298, 136.793793,
+240.687813,
+161.035731, 167.961999, 167.961999, 161.035731, 159.304164, 164.498865,
+157.572597, 155.841030, 150.646329, 140.256927, 128.135958, 126.404391,
+126.404391, 128.135958, 147.183195, 167.961999, 164.498865, 164.498865,
+154.109463, 148.914762, 148.914762, 159.304164, 150.646329, 147.183195,
+145.451628, 155.841030, 148.914762, 147.183195, 157.572597, 150.646329,
+150.646329, 148.914762, 161.035731, 214.714308, 242.419380, 183.546102,
+247.614081,
+174.888267, 164.498865, 167.961999, 167.961999, 166.230432, 164.498865,
+145.451628, 152.377896, 150.646329, 141.988494, 135.062226, 126.404391,
+126.404391, 128.135958, 141.988494, 159.304164, 180.082968, 164.498865,
+152.377896, 154.109463, 150.646329, 154.109463, 148.914762, 147.183195,
+148.914762, 150.646329, 150.646329, 140.256927, 140.256927, 143.720061,
+157.572597, 183.546102, 226.835277, 264.929751, 261.466617, 212.982741,
+230.298411,
+171.425133, 174.888267, 176.619834, 171.425133, 166.230432, 155.841030,
+143.720061, 141.988494, 147.183195, 145.451628, 136.793793, 131.599092,
+128.135958, 128.135958, 135.062226, 140.256927, 154.109463, 166.230432,
+155.841030, 161.035731, 152.377896, 152.377896, 148.914762, 152.377896,
+154.109463, 164.498865, 154.109463, 141.988494, 140.256927, 147.183195,
+180.082968, 204.324906, 244.150947, 277.050720, 223.372143, 237.224679,
+254.540349,
+178.351401, 180.082968, 169.693566, 171.425133, 155.841030, 152.377896,
+140.256927, 131.599092, 140.256927, 143.720061, 136.793793, 133.330659,
+129.867525, 129.867525, 129.867525, 131.599092, 138.525360, 155.841030,
+162.767298, 150.646329, 148.914762, 150.646329, 159.304164, 147.183195,
+147.183195, 147.183195, 150.646329, 150.646329, 154.109463, 157.572597,
+193.935504, 199.130205, 251.077215, 266.661318, 251.077215, 244.150947,
+254.540349,
+183.546102, 178.351401, 173.156700, 171.425133, 159.304164, 141.988494,
+135.062226, 129.867525, 135.062226, 140.256927, 136.793793, 133.330659,
+133.330659, 135.062226, 135.062226, 131.599092, 133.330659, 140.256927,
+154.109463, 150.646329, 145.451628, 145.451628, 155.841030, 148.914762,
+147.183195, 145.451628, 138.525360, 147.183195, 167.961999, 180.082968,
+206.056473, 206.056473, 258.003483, 254.540349, 249.345648, 252.808782,
+263.198184,
+185.277669, 181.814535, 178.351401, 173.156700, 161.035731, 143.720061,
+135.062226, 128.135958, 128.135958, 136.793793, 135.062226, 133.330659,
+131.599092, 135.062226, 138.525360, 136.793793, 131.599092, 135.062226,
+143.720061, 145.451628, 140.256927, 140.256927, 145.451628, 143.720061,
+141.988494, 135.062226, 135.062226, 147.183195, 148.914762, 167.961999,
+181.814535, 197.398638, 251.077215, 252.808782, 256.271916, 254.540349,
+259.735050,
+185.277669, 181.814535, 178.351401, 167.961999, 159.304164, 145.451628,
+124.672824, 124.672824, 129.867525, 133.330659, 131.599092, 129.867525,
+131.599092, 136.793793, 138.525360, 138.525360, 133.330659, 131.599092,
+141.988494, 140.256927, 138.525360, 140.256927, 138.525360, 138.525360,
+138.525360, 133.330659, 128.135958, 128.135958, 126.404391, 133.330659,
+157.572597, 190.472370, 228.566844, 244.150947, 263.198184, 263.198184,
+251.077215,
+185.277669, 181.814535, 178.351401, 166.230432, 159.304164, 148.914762,
+126.404391, 122.941257, 126.404391, 129.867525, 129.867525, 131.599092,
+131.599092, 135.062226, 138.525360, 138.525360, 138.525360, 169.693566,
+138.525360, 138.525360, 141.988494, 141.988494, 138.525360, 135.062226,
+131.599092, 126.404391, 122.941257, 124.672824, 122.941257, 128.135958,
+138.525360, 187.009236, 206.056473, 235.493112, 273.587586, 245.882514,
+237.224679,
+185.277669, 180.082968, 174.888267, 167.961999, 147.183195, 150.646329,
+129.867525, 121.209690, 121.209690, 128.135958, 128.135958, 129.867525,
+133.330659, 135.062226, 138.525360, 141.988494, 190.472370, 202.593339,
+190.472370, 135.062226, 140.256927, 143.720061, 140.256927, 135.062226,
+131.599092, 126.404391, 122.941257, 119.478123, 117.746556, 122.941257,
+128.135958, 164.498865, 207.788040, 238.956246, 256.271916, 247.614081,
+240.687813
+};
+
+const size_t array_double1_size = sizeof(array_double1);
+
+const double array_double2[YSIZE * XSIZE] =
+{
+133.330659, 126.404391, 131.599092, 138.525360, 136.793793, 129.867525,
+141.988494, 112.551855, 107.357154, 110.820288, 102.162453, 102.162453,
+105.625587, 124.672824, 121.209690, 116.014989, 112.551855, 121.209690,
+122.941257, 121.209690, 117.746556, 114.283422, 112.551855, 116.014989,
+114.283422, 114.283422, 114.283422, 114.283422, 114.283422, 114.283422,
+114.283422, 114.283422, 114.283422, 112.551855, 109.088721, 109.088721,
+107.357154,
+129.867525, 122.941257, 122.941257, 136.793793, 140.256927, 129.867525,
+140.256927, 126.404391, 102.162453, 112.551855, 103.894020, 103.894020,
+110.820288, 126.404391, 126.404391, 117.746556, 114.283422, 121.209690,
+124.672824, 122.941257, 117.746556, 114.283422, 114.283422, 116.014989,
+114.283422, 114.283422, 114.283422, 116.014989, 116.014989, 116.014989,
+114.283422, 116.014989, 114.283422, 110.820288, 109.088721, 109.088721,
+109.088721,
+131.599092, 122.941257, 114.283422, 126.404391, 140.256927, 135.062226,
+138.525360, 136.793793, 102.162453, 114.283422, 103.894020, 102.162453,
+107.357154, 128.135958, 128.135958, 122.941257, 116.014989, 121.209690,
+126.404391, 122.941257, 117.746556, 114.283422, 112.551855, 112.551855,
+114.283422, 114.283422, 116.014989, 116.014989, 116.014989, 116.014989,
+116.014989, 116.014989, 114.283422, 110.820288, 110.820288, 110.820288,
+110.820288,
+131.599092, 124.672824, 110.820288, 117.746556, 136.793793, 140.256927,
+138.525360, 138.525360, 102.162453, 117.746556, 103.894020, 102.162453,
+103.894020, 129.867525, 129.867525, 126.404391, 116.014989, 117.746556,
+126.404391, 124.672824, 117.746556, 114.283422, 112.551855, 109.088721,
+116.014989, 116.014989, 116.014989, 116.014989, 117.746556, 116.014989,
+116.014989, 114.283422, 112.551855, 110.820288, 112.551855, 112.551855,
+112.551855,
+136.793793, 124.672824, 109.088721, 114.283422, 126.404391, 138.525360,
+143.720061, 141.988494, 103.894020, 112.551855, 105.625587, 105.625587,
+103.894020, 114.283422, 129.867525, 129.867525, 112.551855, 121.209690,
+126.404391, 124.672824, 117.746556, 114.283422, 112.551855, 110.820288,
+117.746556, 116.014989, 117.746556, 117.746556, 117.746556, 116.014989,
+116.014989, 114.283422, 112.551855, 112.551855, 112.551855, 114.283422,
+112.551855,
+140.256927, 126.404391, 107.357154, 112.551855, 124.672824, 128.135958,
+141.988494, 147.183195, 114.283422, 102.162453, 107.357154, 103.894020,
+103.894020, 109.088721, 129.867525, 131.599092, 117.746556, 119.478123,
+124.672824, 124.672824, 117.746556, 114.283422, 114.283422, 112.551855,
+116.014989, 117.746556, 117.746556, 117.746556, 117.746556, 117.746556,
+114.283422, 114.283422, 110.820288, 114.283422, 112.551855, 114.283422,
+114.283422,
+145.451628, 128.135958, 110.820288, 110.820288, 121.209690, 122.941257,
+135.062226, 145.451628, 121.209690, 100.430886, 103.894020, 102.162453,
+102.162453, 109.088721, 129.867525, 138.525360, 126.404391, 116.014989,
+124.672824, 124.672824, 117.746556, 114.283422, 114.283422, 112.551855,
+114.283422, 117.746556, 117.746556, 117.746556, 117.746556, 117.746556,
+114.283422, 112.551855, 112.551855, 112.551855, 114.283422, 116.014989,
+117.746556,
+150.646329, 140.256927, 114.283422, 109.088721, 112.551855, 117.746556,
+131.599092, 131.599092, 129.867525, 102.162453, 100.430886, 102.162453,
+102.162453, 103.894020, 122.941257, 159.304164, 112.551855, 110.820288,
+128.135958, 124.672824, 119.478123, 116.014989, 112.551855, 112.551855,
+112.551855, 117.746556, 119.478123, 117.746556, 119.478123, 116.014989,
+112.551855, 112.551855, 112.551855, 112.551855, 116.014989, 117.746556,
+119.478123,
+148.914762, 148.914762, 126.404391, 110.820288, 107.357154, 116.014989,
+129.867525, 131.599092, 121.209690, 105.625587, 100.430886, 100.430886,
+102.162453, 103.894020, 140.256927, 117.746556, 102.162453, 109.088721,
+128.135958, 155.841030, 171.425133, 116.014989, 112.551855, 112.551855,
+110.820288, 116.014989, 117.746556, 117.746556, 117.746556, 116.014989,
+112.551855, 112.551855, 114.283422, 112.551855, 114.283422, 117.746556,
+117.746556,
+147.183195, 147.183195, 138.525360, 114.283422, 116.014989, 116.014989,
+140.256927, 128.135958, 107.357154, 109.088721, 102.162453, 100.430886,
+100.430886, 103.894020, 161.035731, 105.625587, 102.162453, 102.162453,
+117.746556, 199.130205, 131.599092, 116.014989, 114.283422, 110.820288,
+110.820288, 114.283422, 117.746556, 117.746556, 117.746556, 114.283422,
+112.551855, 112.551855, 114.283422, 112.551855, 110.820288, 112.551855,
+119.478123,
+155.841030, 150.646329, 143.720061, 122.941257, 128.135958, 133.330659,
+143.720061, 136.793793, 109.088721, 103.894020, 102.162453, 102.162453,
+100.430886, 100.430886, 155.841030, 105.625587, 102.162453, 102.162453,
+116.014989, 138.525360, 122.941257, 117.746556, 114.283422, 110.820288,
+109.088721, 109.088721, 117.746556, 117.746556, 117.746556, 114.283422,
+112.551855, 114.283422, 116.014989, 112.551855, 110.820288, 107.357154,
+150.646329,
+157.572597, 159.304164, 148.914762, 131.599092, 135.062226, 140.256927,
+147.183195, 141.988494, 116.014989, 102.162453, 102.162453, 102.162453,
+102.162453, 103.894020, 152.377896, 124.672824, 102.162453, 103.894020,
+128.135958, 138.525360, 121.209690, 116.014989, 114.283422, 110.820288,
+107.357154, 103.894020, 112.551855, 117.746556, 116.014989, 114.283422,
+112.551855, 116.014989, 114.283422, 110.820288, 107.357154, 102.162453,
+192.203937,
+145.451628, 145.451628, 150.646329, 147.183195, 150.646329, 147.183195,
+145.451628, 145.451628, 124.672824, 102.162453, 102.162453, 102.162453,
+102.162453, 102.162453, 126.404391, 122.941257, 107.357154, 102.162453,
+173.156700, 121.209690, 121.209690, 116.014989, 114.283422, 110.820288,
+103.894020, 100.430886, 100.430886, 116.014989, 117.746556, 114.283422,
+112.551855, 114.283422, 110.820288, 109.088721, 102.162453, 96.967752,
+226.835277,
+138.525360, 155.841030, 150.646329, 143.720061, 152.377896, 154.109463,
+145.451628, 143.720061, 131.599092, 110.820288, 102.162453, 102.162453,
+102.162453, 100.430886, 102.162453, 167.961999, 110.820288, 107.357154,
+122.941257, 117.746556, 121.209690, 126.404391, 114.283422, 109.088721,
+105.625587, 100.430886, 100.430886, 107.357154, 116.014989, 114.283422,
+110.820288, 112.551855, 109.088721, 109.088721, 105.625587, 98.699319,
+258.003483,
+148.914762, 157.572597, 159.304164, 150.646329, 147.183195, 152.377896,
+143.720061, 140.256927, 135.062226, 119.478123, 105.625587, 102.162453,
+102.162453, 102.162453, 102.162453, 105.625587, 143.720061, 124.672824,
+116.014989, 116.014989, 119.478123, 119.478123, 114.283422, 110.820288,
+105.625587, 124.672824, 96.967752, 98.699319, 110.820288, 110.820288,
+110.820288, 110.820288, 112.551855, 199.130205, 259.735050, 161.035731,
+261.466617,
+167.961999, 154.109463, 157.572597, 159.304164, 154.109463, 152.377896,
+128.135958, 138.525360, 135.062226, 122.941257, 112.551855, 102.162453,
+100.430886, 102.162453, 100.430886, 102.162453, 122.941257, 124.672824,
+116.014989, 121.209690, 121.209690, 119.478123, 116.014989, 110.820288,
+109.088721, 114.283422, 96.967752, 93.504618, 98.699319, 102.162453,
+110.820288, 150.646329, 240.687813, 280.513854, 277.050720, 221.640576,
+244.150947,
+162.767298, 166.230432, 167.961999, 162.767298, 154.109463, 141.988494,
+122.941257, 121.209690, 131.599092, 126.404391, 116.014989, 105.625587,
+102.162453, 102.162453, 100.430886, 102.162453, 105.625587, 122.941257,
+116.014989, 129.867525, 121.209690, 117.746556, 121.209690, 112.551855,
+109.088721, 109.088721, 102.162453, 96.967752, 93.504618, 95.236185,
+155.841030, 209.519607, 258.003483, 290.903256, 238.956246, 249.345648,
+271.856019,
+171.425133, 173.156700, 161.035731, 161.035731, 141.988494, 138.525360,
+121.209690, 107.357154, 121.209690, 124.672824, 116.014989, 109.088721,
+103.894020, 103.894020, 100.430886, 100.430886, 103.894020, 117.746556,
+121.209690, 121.209690, 119.478123, 117.746556, 136.793793, 117.746556,
+110.820288, 107.357154, 103.894020, 102.162453, 98.699319, 98.699319,
+152.377896, 207.788040, 261.466617, 280.513854, 266.661318, 258.003483,
+268.392885,
+178.351401, 171.425133, 164.498865, 162.767298, 145.451628, 126.404391,
+116.014989, 107.357154, 112.551855, 119.478123, 116.014989, 110.820288,
+109.088721, 110.820288, 109.088721, 102.162453, 103.894020, 112.551855,
+122.941257, 119.478123, 119.478123, 116.014989, 135.062226, 112.551855,
+109.088721, 105.625587, 102.162453, 105.625587, 103.894020, 117.746556,
+173.156700, 221.640576, 268.392885, 268.392885, 263.198184, 268.392885,
+283.976988,
+180.082968, 176.619834, 171.425133, 164.498865, 148.914762, 128.135958,
+116.014989, 105.625587, 105.625587, 114.283422, 112.551855, 109.088721,
+109.088721, 110.820288, 112.551855, 109.088721, 103.894020, 109.088721,
+121.209690, 119.478123, 116.014989, 116.014989, 116.014989, 112.551855,
+107.357154, 103.894020, 100.430886, 98.699319, 107.357154, 100.430886,
+122.941257, 202.593339, 259.735050, 266.661318, 271.856019, 268.392885,
+282.245421,
+180.082968, 174.888267, 171.425133, 157.572597, 145.451628, 128.135958,
+102.162453, 102.162453, 107.357154, 110.820288, 109.088721, 105.625587,
+107.357154, 110.820288, 110.820288, 110.820288, 105.625587, 103.894020,
+119.478123, 117.746556, 116.014989, 119.478123, 116.014989, 112.551855,
+107.357154, 102.162453, 100.430886, 98.699319, 98.699319, 96.967752,
+102.162453, 180.082968, 237.224679, 254.540349, 275.319153, 278.782287,
+273.587586,
+180.082968, 174.888267, 171.425133, 155.841030, 147.183195, 133.330659,
+103.894020, 98.699319, 103.894020, 107.357154, 107.357154, 107.357154,
+109.088721, 110.820288, 112.551855, 112.551855, 114.283422, 173.156700,
+116.014989, 116.014989, 119.478123, 119.478123, 116.014989, 112.551855,
+109.088721, 103.894020, 100.430886, 96.967752, 93.504618, 95.236185,
+96.967752, 133.330659, 211.251174, 245.882514, 287.440122, 271.856019,
+259.735050,
+180.082968, 174.888267, 167.961999, 159.304164, 133.330659, 136.793793,
+110.820288, 98.699319, 98.699319, 107.357154, 107.357154, 107.357154,
+110.820288, 112.551855, 114.283422, 112.551855, 199.130205, 238.956246,
+223.372143, 110.820288, 117.746556, 121.209690, 117.746556, 114.283422,
+110.820288, 103.894020, 100.430886, 96.967752, 91.773051, 91.773051,
+96.967752, 107.357154, 199.130205, 247.614081, 271.856019, 270.124452,
+275.319153
+};
+
+const size_t array_double2_size = sizeof(array_double2);
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/test_arrays.h b/tiff/test/test_arrays.h
new file mode 100755
index 0000000..2cdf9a9
--- /dev/null
+++ b/tiff/test/test_arrays.h
@@ -0,0 +1,63 @@
+/* $Id: test_arrays.h,v 1.3 2006-03-23 14:54:02 dron Exp $ */
+
+/*
+ * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Few declarations for the test numerical arrays.
+ */
+
+#ifndef _TEST_ARRAYS_
+#define _TEST_ARRAYS_
+
+#include <stddef.h>
+
+#define XSIZE 37
+#define YSIZE 23
+
+extern const unsigned char byte_array1[];
+extern const size_t byte_array1_size;
+
+extern const unsigned char byte_array2[];
+extern const size_t byte_array2_size;
+
+extern const unsigned char byte_array3[];
+extern const size_t byte_array3_size;
+
+extern const float array_float1[];
+extern const size_t array_float1_size;
+
+extern const float array_float2[];
+extern const size_t array_float2_size;
+
+extern const double array_double1[];
+extern const size_t array_double1_size;
+
+extern const double array_double2[];
+extern const size_t array_double2_size;
+
+#endif /* _TEST_ARRAYS_ */
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/tiff2pdf.sh b/tiff/test/tiff2pdf.sh
new file mode 100755
index 0000000..7669989
--- /dev/null
+++ b/tiff/test/tiff2pdf.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiff2pdf
+#
+. ${srcdir:-.}/common.sh
+f_test_stdout "${TIFF2PDF}" "${IMG_MINISWHITE_1C_1B}" "o-tiff2pdf.pdf" \ No newline at end of file
diff --git a/tiff/test/tiff2ps-EPS1.sh b/tiff/test/tiff2ps-EPS1.sh
new file mode 100755
index 0000000..ebe6f04
--- /dev/null
+++ b/tiff/test/tiff2ps-EPS1.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffps with PostScript Level 1 encapsulated output
+#
+. ${srcdir:-.}/common.sh
+f_test_stdout "${TIFF2PS} -e -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-EPS1.ps" \ No newline at end of file
diff --git a/tiff/test/tiff2ps-PS1.sh b/tiff/test/tiff2ps-PS1.sh
new file mode 100755
index 0000000..6592159
--- /dev/null
+++ b/tiff/test/tiff2ps-PS1.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffps with PostScript Level 1 output
+#
+. ${srcdir:-.}/common.sh
+f_test_stdout "${TIFF2PS} -a -p -1" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS1.ps" \ No newline at end of file
diff --git a/tiff/test/tiff2ps-PS2.sh b/tiff/test/tiff2ps-PS2.sh
new file mode 100755
index 0000000..2a21606
--- /dev/null
+++ b/tiff/test/tiff2ps-PS2.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffps with PostScript Level 2 output
+#
+. ${srcdir:-.}/common.sh
+f_test_stdout "${TIFF2PS} -a -p -2" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS2.ps" \ No newline at end of file
diff --git a/tiff/test/tiff2ps-PS3.sh b/tiff/test/tiff2ps-PS3.sh
new file mode 100755
index 0000000..f9f34b6
--- /dev/null
+++ b/tiff/test/tiff2ps-PS3.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffps with PostScript Level 3 output
+#
+. ${srcdir:-.}/common.sh
+f_test_stdout "${TIFF2PS} -a -p -3" "${IMG_MINISWHITE_1C_1B}" "o-tiff2ps-PS3.ps" \ No newline at end of file
diff --git a/tiff/test/tiff2rgba-logluv-3c-16b.sh b/tiff/test/tiff2rgba-logluv-3c-16b.sh
new file mode 100755
index 0000000..bc9b311
--- /dev/null
+++ b/tiff/test/tiff2rgba-logluv-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/logluv-3c-16b.tiff"
+outfile="o-tiff2rgba-logluv-3c-16b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-minisblack-1c-16b.sh b/tiff/test/tiff2rgba-minisblack-1c-16b.sh
new file mode 100755
index 0000000..5be7e65
--- /dev/null
+++ b/tiff/test/tiff2rgba-minisblack-1c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-16b.tiff"
+outfile="o-tiff2rgba-minisblack-1c-16b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-minisblack-1c-8b.sh b/tiff/test/tiff2rgba-minisblack-1c-8b.sh
new file mode 100755
index 0000000..ce0507b
--- /dev/null
+++ b/tiff/test/tiff2rgba-minisblack-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-8b.tiff"
+outfile="o-tiff2rgba-minisblack-1c-8b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh b/tiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh
new file mode 100755
index 0000000..2cbe81d
--- /dev/null
+++ b/tiff/test/tiff2rgba-minisblack-2c-8b-alpha.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-2c-8b-alpha.tiff"
+outfile="o-tiff2rgba-minisblack-2c-8b-alpha.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-miniswhite-1c-1b.sh b/tiff/test/tiff2rgba-miniswhite-1c-1b.sh
new file mode 100755
index 0000000..3601502
--- /dev/null
+++ b/tiff/test/tiff2rgba-miniswhite-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/miniswhite-1c-1b.tiff"
+outfile="o-tiff2rgba-miniswhite-1c-1b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-palette-1c-1b.sh b/tiff/test/tiff2rgba-palette-1c-1b.sh
new file mode 100755
index 0000000..091d798
--- /dev/null
+++ b/tiff/test/tiff2rgba-palette-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-1b.tiff"
+outfile="o-tiff2rgba-palette-1c-1b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-palette-1c-4b.sh b/tiff/test/tiff2rgba-palette-1c-4b.sh
new file mode 100755
index 0000000..ee3898e
--- /dev/null
+++ b/tiff/test/tiff2rgba-palette-1c-4b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-4b.tiff"
+outfile="o-tiff2rgba-palette-1c-4b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-palette-1c-8b.sh b/tiff/test/tiff2rgba-palette-1c-8b.sh
new file mode 100755
index 0000000..b1db606
--- /dev/null
+++ b/tiff/test/tiff2rgba-palette-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-8b.tiff"
+outfile="o-tiff2rgba-palette-1c-8b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-quad-tile.jpg.sh b/tiff/test/tiff2rgba-quad-tile.jpg.sh
new file mode 100755
index 0000000..e921b97
--- /dev/null
+++ b/tiff/test/tiff2rgba-quad-tile.jpg.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/quad-tile.jpg.tiff"
+outfile="o-tiff2rgba-quad-tile.jpg.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-rgb-3c-16b.sh b/tiff/test/tiff2rgba-rgb-3c-16b.sh
new file mode 100755
index 0000000..954eb4f
--- /dev/null
+++ b/tiff/test/tiff2rgba-rgb-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-16b.tiff"
+outfile="o-tiff2rgba-rgb-3c-16b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiff2rgba-rgb-3c-8b.sh b/tiff/test/tiff2rgba-rgb-3c-8b.sh
new file mode 100755
index 0000000..24f5cb0
--- /dev/null
+++ b/tiff/test/tiff2rgba-rgb-3c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-8b.tiff"
+outfile="o-tiff2rgba-rgb-3c-8b.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcp-g3-1d-fill.sh b/tiff/test/tiffcp-g3-1d-fill.sh
new file mode 100755
index 0000000..ee12498
--- /dev/null
+++ b/tiff/test/tiffcp-g3-1d-fill.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G3 compression, 1 dimensional
+# encoding, and zero-filled boundaries.
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g3:1d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d-fill.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-g3-1d.sh b/tiff/test/tiffcp-g3-1d.sh
new file mode 100755
index 0000000..c11ef97
--- /dev/null
+++ b/tiff/test/tiffcp-g3-1d.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G3 compression and 1 dimensional encoding.
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g3:1d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-1d.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-g3-2d-fill.sh b/tiff/test/tiffcp-g3-2d-fill.sh
new file mode 100755
index 0000000..c25825d
--- /dev/null
+++ b/tiff/test/tiffcp-g3-2d-fill.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G3 compression, 2 dimensional
+# encoding, and zero-filled boundaries.
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g3:2d:fill" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d-fill.tiff"
diff --git a/tiff/test/tiffcp-g3-2d.sh b/tiff/test/tiffcp-g3-2d.sh
new file mode 100755
index 0000000..5a59dd2
--- /dev/null
+++ b/tiff/test/tiffcp-g3-2d.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G3 compression and 2 dimensional encoding.
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g3:2d" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3-2d.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-g3.sh b/tiff/test/tiffcp-g3.sh
new file mode 100755
index 0000000..d7a0107
--- /dev/null
+++ b/tiff/test/tiffcp-g3.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G3 compression
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g3" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g3.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-g4.sh b/tiff/test/tiffcp-g4.sh
new file mode 100755
index 0000000..fb8967a
--- /dev/null
+++ b/tiff/test/tiffcp-g4.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with G4 compression
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c g4" "${IMG_MINISWHITE_1C_1B}" "o-tiffcp-g4.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-logluv.sh b/tiff/test/tiffcp-logluv.sh
new file mode 100755
index 0000000..3f62f57
--- /dev/null
+++ b/tiff/test/tiffcp-logluv.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp with logluv compression
+#
+. ${srcdir:-.}/common.sh
+f_test_convert "${TIFFCP} -c none" "${srcdir}/images/logluv-3c-16b.tiff" "o-tiffcp-logluv-raw.tiff"
+f_test_convert "${TIFFCP} -c sgilog" "o-tiffcp-logluv-raw.tiff" "o-tiffcp-logluv-sgilog.tiff" \ No newline at end of file
diff --git a/tiff/test/tiffcp-split-join.sh b/tiff/test/tiffcp-split-join.sh
new file mode 100755
index 0000000..d1e407c
--- /dev/null
+++ b/tiff/test/tiffcp-split-join.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp + tiffsplit + tiffcp
+#
+# First we use tiffcp to join our test files into a multi-frame TIFF
+# then we use tiffsplit to split them out again, and then we use
+# tiffcp to recombine again.
+
+. ${srcdir:-.}/common.sh
+conjoined=o-tiffcp-split-join-conjoined.tif
+reconjoined=o-tiffcp-split-join-reconjoined.tif
+splitfile=o-tiffcp-split-join-split-
+
+f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}"
+f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}"
+f_test_convert "${TIFFCP}" "${splitfile}*" "${reconjoined}" \ No newline at end of file
diff --git a/tiff/test/tiffcp-split.sh b/tiff/test/tiffcp-split.sh
new file mode 100755
index 0000000..a2f98e3
--- /dev/null
+++ b/tiff/test/tiffcp-split.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffcp + tiffsplit
+#
+# First we use tiffcp to join our test files into a multi-frame TIFF
+# and then we use tiffsplit to split them out again.
+#
+. ${srcdir:-.}/common.sh
+conjoined=o-tiffcp-split-conjoined.tif
+splitfile=o-tiffcp-split-split-
+
+f_test_convert "${TIFFCP}" "${IMG_UNCOMPRESSED}" "${conjoined}"
+f_test_convert "${TIFFSPLIT}" "${conjoined}" "${splitfile}" \ No newline at end of file
diff --git a/tiff/test/tiffcp-thumbnail.sh b/tiff/test/tiffcp-thumbnail.sh
new file mode 100755
index 0000000..789cd80
--- /dev/null
+++ b/tiff/test/tiffcp-thumbnail.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Basic sanity check for thumbnail
+#
+. ${srcdir:-.}/common.sh
+
+outfile1=o-tiffcp-thumbnail-in.tif
+outfile2=o-tiffcp-thumbnail-out.tif
+f_test_convert "${TIFFCP} -c g3:1d" "${IMG_MINISWHITE_1C_1B}" "${outfile1}"
+f_test_convert "${THUMBNAIL}" "${outfile1}" "${outfile2}" \ No newline at end of file
diff --git a/tiff/test/tiffcrop-R90-logluv-3c-16b.sh b/tiff/test/tiffcrop-R90-logluv-3c-16b.sh
new file mode 100755
index 0000000..9ed219e
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-logluv-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/logluv-3c-16b.tiff"
+outfile="o-tiffcrop-R90-logluv-3c-16b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-minisblack-1c-16b.sh b/tiff/test/tiffcrop-R90-minisblack-1c-16b.sh
new file mode 100755
index 0000000..faee731
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-minisblack-1c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-16b.tiff"
+outfile="o-tiffcrop-R90-minisblack-1c-16b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-minisblack-1c-8b.sh b/tiff/test/tiffcrop-R90-minisblack-1c-8b.sh
new file mode 100755
index 0000000..7acd5e7
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-minisblack-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-8b.tiff"
+outfile="o-tiffcrop-R90-minisblack-1c-8b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh b/tiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh
new file mode 100755
index 0000000..2ef9039
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-minisblack-2c-8b-alpha.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-2c-8b-alpha.tiff"
+outfile="o-tiffcrop-R90-minisblack-2c-8b-alpha.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-miniswhite-1c-1b.sh b/tiff/test/tiffcrop-R90-miniswhite-1c-1b.sh
new file mode 100755
index 0000000..cae85f2
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-miniswhite-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/miniswhite-1c-1b.tiff"
+outfile="o-tiffcrop-R90-miniswhite-1c-1b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-palette-1c-1b.sh b/tiff/test/tiffcrop-R90-palette-1c-1b.sh
new file mode 100755
index 0000000..ca68b88
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-palette-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-1b.tiff"
+outfile="o-tiffcrop-R90-palette-1c-1b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-palette-1c-4b.sh b/tiff/test/tiffcrop-R90-palette-1c-4b.sh
new file mode 100755
index 0000000..3cd96eb
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-palette-1c-4b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-4b.tiff"
+outfile="o-tiffcrop-R90-palette-1c-4b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-palette-1c-8b.sh b/tiff/test/tiffcrop-R90-palette-1c-8b.sh
new file mode 100755
index 0000000..daccfd3
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-palette-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-8b.tiff"
+outfile="o-tiffcrop-R90-palette-1c-8b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-rgb-3c-16b.sh b/tiff/test/tiffcrop-R90-rgb-3c-16b.sh
new file mode 100755
index 0000000..b1dddc3
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-rgb-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-16b.tiff"
+outfile="o-tiffcrop-R90-rgb-3c-16b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-R90-rgb-3c-8b.sh b/tiff/test/tiffcrop-R90-rgb-3c-8b.sh
new file mode 100755
index 0000000..0a502c8
--- /dev/null
+++ b/tiff/test/tiffcrop-R90-rgb-3c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-8b.tiff"
+outfile="o-tiffcrop-R90-rgb-3c-8b.tiff"
+f_test_convert "$TIFFCROP -R90" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh b/tiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh
new file mode 100755
index 0000000..c1b19b9
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-logluv-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/logluv-3c-16b.tiff"
+outfile="o-tiffcrop-doubleflip-logluv-3c-16b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh b/tiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh
new file mode 100755
index 0000000..1e2c4c9
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-minisblack-1c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-16b.tiff"
+outfile="o-tiffcrop-doubleflip-minisblack-1c-16b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh b/tiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh
new file mode 100755
index 0000000..77798d9
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-minisblack-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-8b.tiff"
+outfile="o-tiffcrop-doubleflip-minisblack-1c-8b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh b/tiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh
new file mode 100755
index 0000000..b5b9db6
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-2c-8b-alpha.tiff"
+outfile="o-tiffcrop-doubleflip-minisblack-2c-8b-alpha.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh b/tiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh
new file mode 100755
index 0000000..07aab91
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-miniswhite-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/miniswhite-1c-1b.tiff"
+outfile="o-tiffcrop-doubleflip-miniswhite-1c-1b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-palette-1c-1b.sh b/tiff/test/tiffcrop-doubleflip-palette-1c-1b.sh
new file mode 100755
index 0000000..581f7eb
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-palette-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-1b.tiff"
+outfile="o-tiffcrop-doubleflip-palette-1c-1b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-palette-1c-4b.sh b/tiff/test/tiffcrop-doubleflip-palette-1c-4b.sh
new file mode 100755
index 0000000..d09b2aa
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-palette-1c-4b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-4b.tiff"
+outfile="o-tiffcrop-doubleflip-palette-1c-4b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-palette-1c-8b.sh b/tiff/test/tiffcrop-doubleflip-palette-1c-8b.sh
new file mode 100755
index 0000000..53a08ae
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-palette-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-8b.tiff"
+outfile="o-tiffcrop-doubleflip-palette-1c-8b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh b/tiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh
new file mode 100755
index 0000000..7165ad5
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-rgb-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-16b.tiff"
+outfile="o-tiffcrop-doubleflip-rgb-3c-16b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh b/tiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh
new file mode 100755
index 0000000..6bfa067
--- /dev/null
+++ b/tiff/test/tiffcrop-doubleflip-rgb-3c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-8b.tiff"
+outfile="o-tiffcrop-doubleflip-rgb-3c-8b.tiff"
+f_test_convert "$TIFFCROP -F both" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-logluv-3c-16b.sh b/tiff/test/tiffcrop-extract-logluv-3c-16b.sh
new file mode 100755
index 0000000..821694b
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-logluv-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/logluv-3c-16b.tiff"
+outfile="o-tiffcrop-extract-logluv-3c-16b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-minisblack-1c-16b.sh b/tiff/test/tiffcrop-extract-minisblack-1c-16b.sh
new file mode 100755
index 0000000..603fc1c
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-minisblack-1c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-16b.tiff"
+outfile="o-tiffcrop-extract-minisblack-1c-16b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-minisblack-1c-8b.sh b/tiff/test/tiffcrop-extract-minisblack-1c-8b.sh
new file mode 100755
index 0000000..6e473c5
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-minisblack-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-8b.tiff"
+outfile="o-tiffcrop-extract-minisblack-1c-8b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh b/tiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh
new file mode 100755
index 0000000..976e888
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-minisblack-2c-8b-alpha.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-2c-8b-alpha.tiff"
+outfile="o-tiffcrop-extract-minisblack-2c-8b-alpha.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-miniswhite-1c-1b.sh b/tiff/test/tiffcrop-extract-miniswhite-1c-1b.sh
new file mode 100755
index 0000000..ca2b63c
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-miniswhite-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/miniswhite-1c-1b.tiff"
+outfile="o-tiffcrop-extract-miniswhite-1c-1b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-palette-1c-1b.sh b/tiff/test/tiffcrop-extract-palette-1c-1b.sh
new file mode 100755
index 0000000..e4aca8e
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-palette-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-1b.tiff"
+outfile="o-tiffcrop-extract-palette-1c-1b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-palette-1c-4b.sh b/tiff/test/tiffcrop-extract-palette-1c-4b.sh
new file mode 100755
index 0000000..18884e4
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-palette-1c-4b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-4b.tiff"
+outfile="o-tiffcrop-extract-palette-1c-4b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-palette-1c-8b.sh b/tiff/test/tiffcrop-extract-palette-1c-8b.sh
new file mode 100755
index 0000000..cd418e0
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-palette-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-8b.tiff"
+outfile="o-tiffcrop-extract-palette-1c-8b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-rgb-3c-16b.sh b/tiff/test/tiffcrop-extract-rgb-3c-16b.sh
new file mode 100755
index 0000000..a3899d3
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-rgb-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-16b.tiff"
+outfile="o-tiffcrop-extract-rgb-3c-16b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extract-rgb-3c-8b.sh b/tiff/test/tiffcrop-extract-rgb-3c-8b.sh
new file mode 100755
index 0000000..c03b037
--- /dev/null
+++ b/tiff/test/tiffcrop-extract-rgb-3c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-8b.tiff"
+outfile="o-tiffcrop-extract-rgb-3c-8b.tiff"
+f_test_convert "$TIFFCROP -U px -E top -X 60 -Y 60" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-logluv-3c-16b.sh b/tiff/test/tiffcrop-extractz14-logluv-3c-16b.sh
new file mode 100755
index 0000000..a617ad9
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-logluv-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/logluv-3c-16b.tiff"
+outfile="o-tiffcrop-extractz14-logluv-3c-16b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh b/tiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh
new file mode 100755
index 0000000..320fd5a
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-minisblack-1c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-16b.tiff"
+outfile="o-tiffcrop-extractz14-minisblack-1c-16b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh b/tiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh
new file mode 100755
index 0000000..8df8578
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-minisblack-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-1c-8b.tiff"
+outfile="o-tiffcrop-extractz14-minisblack-1c-8b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh b/tiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh
new file mode 100755
index 0000000..3e8ee15
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-minisblack-2c-8b-alpha.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/minisblack-2c-8b-alpha.tiff"
+outfile="o-tiffcrop-extractz14-minisblack-2c-8b-alpha.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh b/tiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh
new file mode 100755
index 0000000..2cbffaa
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-miniswhite-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/miniswhite-1c-1b.tiff"
+outfile="o-tiffcrop-extractz14-miniswhite-1c-1b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-palette-1c-1b.sh b/tiff/test/tiffcrop-extractz14-palette-1c-1b.sh
new file mode 100755
index 0000000..e0b305f
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-palette-1c-1b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-1b.tiff"
+outfile="o-tiffcrop-extractz14-palette-1c-1b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-palette-1c-4b.sh b/tiff/test/tiffcrop-extractz14-palette-1c-4b.sh
new file mode 100755
index 0000000..980b2bb
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-palette-1c-4b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-4b.tiff"
+outfile="o-tiffcrop-extractz14-palette-1c-4b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-palette-1c-8b.sh b/tiff/test/tiffcrop-extractz14-palette-1c-8b.sh
new file mode 100755
index 0000000..af2e04c
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-palette-1c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/palette-1c-8b.tiff"
+outfile="o-tiffcrop-extractz14-palette-1c-8b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-rgb-3c-16b.sh b/tiff/test/tiffcrop-extractz14-rgb-3c-16b.sh
new file mode 100755
index 0000000..9bc76e3
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-rgb-3c-16b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-16b.tiff"
+outfile="o-tiffcrop-extractz14-rgb-3c-16b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffcrop-extractz14-rgb-3c-8b.sh b/tiff/test/tiffcrop-extractz14-rgb-3c-8b.sh
new file mode 100755
index 0000000..21f76b8
--- /dev/null
+++ b/tiff/test/tiffcrop-extractz14-rgb-3c-8b.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/rgb-3c-8b.tiff"
+outfile="o-tiffcrop-extractz14-rgb-3c-8b.tiff"
+f_test_convert "$TIFFCROP -E left -Z1:4,2:4" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/test/tiffdump.sh b/tiff/test/tiffdump.sh
new file mode 100755
index 0000000..3cd7c10
--- /dev/null
+++ b/tiff/test/tiffdump.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffdump
+#
+. ${srcdir:-.}/common.sh
+f_test_reader "${TIFFDUMP}" "${IMG_MINISWHITE_1C_1B}" \ No newline at end of file
diff --git a/tiff/test/tiffinfo.sh b/tiff/test/tiffinfo.sh
new file mode 100755
index 0000000..cb57248
--- /dev/null
+++ b/tiff/test/tiffinfo.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#
+# Basic sanity check for tiffinfo.
+#
+. ${srcdir:-.}/common.sh
+f_test_reader "${TIFFINFO} -c -D -d -j -s " "${IMG_MINISBLACK_1C_16B}"
diff --git a/tiff/test/tifftest.h b/tiff/test/tifftest.h
new file mode 100755
index 0000000..889c644
--- /dev/null
+++ b/tiff/test/tifftest.h
@@ -0,0 +1,42 @@
+/* $Id: tifftest.h,v 1.1 2008-04-15 14:18:36 dron Exp $ */
+
+/*
+ * Copyright (c) 2008, Andrey Kiselev <dron@ak4719.spb.edu>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the names of
+ * Sam Leffler and Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Sam Leffler and Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#ifndef _TIFFTEST_
+#define _TIFFTEST_
+
+/*
+ * TIFF Library
+ *
+ * Header file for helper testing routines.
+ */
+
+#include "tiffio.h"
+
+int CheckShortField(TIFF *, const ttag_t, const uint16);
+int CheckShortPairedField(TIFF *, const ttag_t, const uint16*);
+int CheckLongField(TIFF *, const ttag_t, const uint32);
+
+#endif /* _TIFFTEST_ */
+