added tiff2rgba tests

This commit is contained in:
Frank Warmerdam 2009-02-13 21:26:03 +00:00
parent 15760800eb
commit a042a8d460
5 changed files with 39 additions and 3 deletions

View File

@ -56,12 +56,14 @@ TESTSCRIPTS = \
tiff2ps-PS3.sh \
tiff2ps-EPS1.sh \
tiff2pdf.sh \
tiffcrop.sh
tiffcrop.sh \
tiff2rgba.sh
IMAGES = \
images/minisblack-1c-16b.tiff \
images/minisblack-1c-8b.tiff \
images/miniswhite-1c-1b.tiff \
images/miniswhite-2c-8b-alpha.tiff \
images/palette-1c-1b.tiff \
images/palette-1c-4b.tiff \
images/palette-1c-8b.tiff \

View File

@ -41,6 +41,7 @@ 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
# 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}"

View File

@ -1,4 +1,4 @@
The test files in this directory have dimension 157x151.
The test files in this directory mostly have dimension 157x151.
The naming convention is
photometric-channels-bits.tiff
@ -12,4 +12,8 @@ palette-1c-8b.tiff
rgb-3c-16b.tiff
rgb-3c-8b.tiff
minisblack-2c-8b-alpha.tiff: grey+alpha

Binary file not shown.

29
test/tiff2rgba.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
#
# Test a few case of the RGBA interface.
#
. ${srcdir:-.}/common.sh
outfile=deleteme-$$.tif
operation=tiff2rgba
for FILE in \
minisblack-2c-8b-alpha.tiff \
palette-1c-1b.tiff \
palette-1c-8b.tiff \
rgb-3c-8b.tiff \
minisblack-1c-8b.tiff ; do
${TIFF2RGBA} images/$FILE tiff2rgba-$FILE
status=$?
if test $status -eq 0 ; then
rm -f tiff2rgba-$FILE
else
echo "Test failed (${operation} returns ${status}). Please inspect these output files:"
echo " " tiff2rgba-$FILE
fi
done
exit $status