@@ -29,14 +29,18 @@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la
29
29
30
30
EXTRA_DIST = \
31
31
$(TESTSCRIPTS ) \
32
- $(IMAGES ) \
32
+ $(IMAGES_EXTRA_DIST ) \
33
33
common.sh
34
34
35
35
# All of the tests to execute via 'make check'
36
36
TESTS = $(check_PROGRAMS ) $(TESTSCRIPTS )
37
37
38
38
# Tests which are expected to fail
39
- XFAIL_TESTS =
39
+ XFAIL_TESTS = \
40
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
41
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh \
42
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
43
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh
40
44
41
45
# Extra files which should be cleaned by 'make clean'
42
46
CLEANFILES = test_packbits.tif deleteme*
@@ -63,21 +67,68 @@ TESTSCRIPTS = \
63
67
tiff2ps-PS3.sh \
64
68
tiff2ps-EPS1.sh \
65
69
tiff2pdf.sh \
66
- tiffcrop.sh \
70
+ tiffcrop-doubleflip-logluv-3c-16b.sh \
71
+ tiffcrop-doubleflip-minisblack-1c-16b.sh \
72
+ tiffcrop-doubleflip-minisblack-1c-8b.sh \
73
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
74
+ tiffcrop-doubleflip-miniswhite-1c-1b.sh \
75
+ tiffcrop-doubleflip-palette-1c-1b.sh \
76
+ tiffcrop-doubleflip-palette-1c-4b.sh \
77
+ tiffcrop-doubleflip-palette-1c-8b.sh \
78
+ tiffcrop-doubleflip-rgb-3c-16b.sh \
79
+ tiffcrop-doubleflip-rgb-3c-8b.sh \
80
+ tiffcrop-extract-logluv-3c-16b.sh \
81
+ tiffcrop-extract-minisblack-1c-16b.sh \
82
+ tiffcrop-extract-minisblack-1c-8b.sh \
83
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh \
84
+ tiffcrop-extract-miniswhite-1c-1b.sh \
85
+ tiffcrop-extract-palette-1c-1b.sh \
86
+ tiffcrop-extract-palette-1c-4b.sh \
87
+ tiffcrop-extract-palette-1c-8b.sh \
88
+ tiffcrop-extract-rgb-3c-16b.sh \
89
+ tiffcrop-extract-rgb-3c-8b.sh \
90
+ tiffcrop-extractz14-logluv-3c-16b.sh \
91
+ tiffcrop-extractz14-minisblack-1c-16b.sh \
92
+ tiffcrop-extractz14-minisblack-1c-8b.sh \
93
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
94
+ tiffcrop-extractz14-miniswhite-1c-1b.sh \
95
+ tiffcrop-extractz14-palette-1c-1b.sh \
96
+ tiffcrop-extractz14-palette-1c-4b.sh \
97
+ tiffcrop-extractz14-palette-1c-8b.sh \
98
+ tiffcrop-extractz14-rgb-3c-16b.sh \
99
+ tiffcrop-extractz14-rgb-3c-8b.sh \
100
+ tiffcrop-R90-logluv-3c-16b.sh \
101
+ tiffcrop-R90-minisblack-1c-16b.sh \
102
+ tiffcrop-R90-minisblack-1c-8b.sh \
103
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh \
104
+ tiffcrop-R90-miniswhite-1c-1b.sh \
105
+ tiffcrop-R90-palette-1c-1b.sh \
106
+ tiffcrop-R90-palette-1c-4b.sh \
107
+ tiffcrop-R90-palette-1c-8b.sh \
108
+ tiffcrop-R90-rgb-3c-16b.sh \
109
+ tiffcrop-R90-rgb-3c-8b.sh \
67
110
tiff2rgba.sh
68
111
69
- IMAGES = \
112
+ # This list should contain all of the TIFF files in the 'images'
113
+ # subdirectory which are intended to be used as input images for
114
+ # tests. All of these files should use the extension ".tiff".
115
+ TIFFIMAGES = \
116
+ images/logluv-3c-16b.tiff \
70
117
images/minisblack-1c-16b.tiff \
71
118
images/minisblack-1c-8b.tiff \
119
+ images/minisblack-2c-8b-alpha.tiff \
72
120
images/miniswhite-1c-1b.tiff \
73
- images/miniswhite-2c-8b-alpha.tiff \
74
121
images/palette-1c-1b.tiff \
75
122
images/palette-1c-4b.tiff \
76
123
images/palette-1c-8b.tiff \
77
- images/README.txt \
78
- images/logluv-3c-16b.tiff \
79
124
images/rgb-3c-16b.tiff \
80
- images/rgb-3c-8b.tiff
125
+ images/rgb-3c-8b.tiff
126
+
127
+ # This list should include all of the files in the 'images'
128
+ # subdirectory which are intended to be distributed.
129
+ IMAGES_EXTRA_DIST = \
130
+ images/README.txt \
131
+ $(TIFFIMAGES )
81
132
82
133
noinst_HEADERS = tifftest.h
83
134
@@ -94,3 +145,64 @@ rewrite_LDADD = $(LIBTIFF)
94
145
95
146
INCLUDES = -I$(top_srcdir ) /libtiff
96
147
148
+ # Test rotations
149
+ generate-tiffcrop-R90-tests :
150
+ for file in $( TIFFIMAGES) ; \
151
+ do \
152
+ base=` basename $$ file .tiff` ; \
153
+ testscript=$(srcdir ) /tiffcrop-R90-$$ base.sh ; \
154
+ ( \
155
+ echo " #!/bin/sh" ; \
156
+ echo " . \$ ${srcdir:- .} /common.sh" ; \
157
+ echo " f_test_convert \"\$ $TIFFCROP -R90\" \"\$ $srcdir /$$ file\" \" deleteme-tiffcrop-R90-$$ base.tiff\" " ; \
158
+ ) > $$ testscript ; \
159
+ chmod +x $$ testscript ; \
160
+ done
161
+
162
+ # Test flip (mirror)
163
+ generate-tiffcrop-doubleflip-tests :
164
+ for file in $( TIFFIMAGES) ; \
165
+ do \
166
+ base=` basename $$ file .tiff` ; \
167
+ testscript=$(srcdir ) /tiffcrop-doubleflip-$$ base.sh ; \
168
+ ( \
169
+ echo " #!/bin/sh" ; \
170
+ echo " . \$ ${srcdir:- .} /common.sh" ; \
171
+ echo " f_test_convert \"\$ $TIFFCROP -F both\" \"\$ $srcdir /$$ file\" \" deleteme-tiffcrop-doubleflip-$$ base.tiff\" " ; \
172
+ ) > $$ testscript ; \
173
+ chmod +x $$ testscript ; \
174
+ done
175
+
176
+ # Test extracting a section 100 pixels wide and 100 pixels high
177
+ generate-tiffcrop-extract-tests :
178
+ for file in $( TIFFIMAGES) ; \
179
+ do \
180
+ base=` basename $$ file .tiff` ; \
181
+ testscript=$(srcdir ) /tiffcrop-extract-$$ base.sh ; \
182
+ ( \
183
+ echo " #!/bin/sh" ; \
184
+ echo " . \$ ${srcdir:- .} /common.sh" ; \
185
+ echo " f_test_convert \"\$ $TIFFCROP -U px -E top -X 100 -Y 100\" \"\$ $srcdir /$$ file\" \" deleteme-tiffcrop-extract-$$ base.tiff\" " ; \
186
+ ) > $$ testscript ; \
187
+ chmod +x $$ testscript ; \
188
+ done
189
+
190
+ # Test extracting the first and fourth quarters from the left side.
191
+ generate-tiffcrop-extractz14-tests :
192
+ for file in $( TIFFIMAGES) ; \
193
+ do \
194
+ base=` basename $$ file .tiff` ; \
195
+ testscript=$(srcdir ) /tiffcrop-extractz14-$$ base.sh ; \
196
+ ( \
197
+ echo " #!/bin/sh" ; \
198
+ echo " . \$ ${srcdir:- .} /common.sh" ; \
199
+ echo " f_test_convert \"\$ $TIFFCROP -E left -Z1:4,2:4\" \"\$ $srcdir /$$ file\" \" deleteme-tiffcrop-extractz14-$$ base.tiff\" " ; \
200
+ ) > $$ testscript ; \
201
+ chmod +x $$ testscript ; \
202
+ done
203
+
204
+ generate-tiffcrop-tests : \
205
+ generate-tiffcrop-R90-tests \
206
+ generate-tiffcrop-doubleflip-tests \
207
+ generate-tiffcrop-extract-tests \
208
+ generate-tiffcrop-extractz14-tests
0 commit comments