Two tests are disabled, both related to tiles, since they do not follow the fully released spec themselves but incidentally decode with libtiff anyways. The two images (`cramps-tile.tif`, `quad-tile.tif`) are tiled layout which libtiff detects by the presence of TileWidth/TileHeight tags. We would detect that by chunks encoded via TileOffsets and TileByteLengths tags. However the images encoded their chunk data into the StripOffsets tag; additionally they contain a RowsPerStrip value anyways. Tests disabled as this is to be resolved in a separate issue (#338) with a decision on treatment of this situation (strictness setting or copying libtiff, also error late for mismatched lengths).
73 lines
2.7 KiB
Bash
Executable File
73 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/ksh
|
|
|
|
GM=/scratch/bfriesen/build/GraphicsMagick-32-static/utilities/gm
|
|
GM_STD_OPT="-compress none"
|
|
MASTER_IMAGE_ORIGINAL='/home/bfriesen/images/david/112_1201-flowers.jpg'
|
|
MASTER_IMAGE_GRAY=gray.miff
|
|
MASTER_IMAGE_RGB=rgb.miff
|
|
MASTER_IMAGE_CMYK=cmyk.miff
|
|
COLUMNS=73
|
|
ROWS=43
|
|
|
|
GRAY_DEPTHS='2 4 6 8 10 12 14 16 24 32'
|
|
PSEUDO_DEPTHS='2 4 8 16'
|
|
TRUE_COLORS='2 4 8 10 12 14 16 24 32'
|
|
CMYK_COLORS='8 16'
|
|
|
|
SUMMARY=summary.txt
|
|
echo > $SUMMARY
|
|
|
|
$GM convert $MASTER_IMAGE_ORIGINAL +profile '*' -depth 32 -type Grayscale -density 72x72 -geometry "${COLUMNS}x${ROWS}" $MASTER_IMAGE_GRAY
|
|
$GM convert $MASTER_IMAGE_ORIGINAL +profile '*' -depth 32 -density 72x72 -geometry "${COLUMNS}x${ROWS}" $MASTER_IMAGE_RGB
|
|
$GM convert $MASTER_IMAGE_ORIGINAL +profile '*' -colorspace cmyk -depth 32 -density 72x72 -geometry "${COLUMNS}x${ROWS}" $MASTER_IMAGE_CMYK
|
|
|
|
# Gray images
|
|
for depth in $GRAY_DEPTHS
|
|
do
|
|
outname=`printf "flower-minisblack-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} $depth-bit minisblack gray image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_GRAY $GM_STD_OPT -type Grayscale -define tiff:bits-per-sample=$depth $outname
|
|
done
|
|
|
|
# Colormapped images
|
|
for depth in $PSEUDO_DEPTHS
|
|
do
|
|
colors=`echo "2^${depth}" | bc`
|
|
outname=`printf "flower-palette-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} ${colors}-entry colormapped image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_RGB $GM_STD_OPT -colors $colors $outname
|
|
done
|
|
|
|
# Truecolor images
|
|
for depth in $TRUE_COLORS
|
|
do
|
|
outname=`printf "flower-rgb-contig-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} $depth-bit contiguous RGB image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_RGB $GM_STD_OPT -type TrueColor -define tiff:bits-per-sample=$depth $outname
|
|
done
|
|
|
|
# Truecolor planar images
|
|
for depth in $TRUE_COLORS
|
|
do
|
|
outname=`printf "flower-rgb-planar-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} $depth-bit seperated RGB image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_RGB $GM_STD_OPT -type TrueColor -interlace plane -define tiff:bits-per-sample=$depth $outname
|
|
done
|
|
|
|
# CMYK images
|
|
for depth in $CMYK_COLORS
|
|
do
|
|
outname=`printf "flower-separated-contig-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} $depth-bit contiguous CMYK image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_RGB $GM_STD_OPT -type ColorSeparation -define tiff:bits-per-sample=$depth $outname
|
|
done
|
|
|
|
# CMYK planar images
|
|
for depth in $CMYK_COLORS
|
|
do
|
|
outname=`printf "flower-separated-planar-%02d.tif" $depth`
|
|
echo "$outname\t${COLUMNS}x${ROWS} $depth-bit separated CMYK image" >> $SUMMARY
|
|
$GM convert -verbose $MASTER_IMAGE_RGB $GM_STD_OPT -type ColorSeparation -interlace plane -define tiff:bits-per-sample=$depth $outname
|
|
done
|
|
|
|
rm -f $MASTER_IMAGE_GRAY $MASTER_IMAGE_RGB $MASTER_IMAGE_CMYK |