Skip to content

Commit 5d8db4b

Browse files
redder86rouault
authored andcommitted
Add some basic sanity checks for tiffcp and tiffcrop RGB->YCbCr JPEG conversions.
1 parent 72bd93d commit 5d8db4b

5 files changed

+27
-2
lines changed

test/Makefile.am

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ JPEG_DEPENDENT_TESTSCRIPTS=\
6161
tiff2rgba-quad-tile.jpg.sh \
6262
tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \
6363
tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \
64-
tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh
64+
tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh \
65+
tiff2rgba-32bpp-None-jpeg.sh \
66+
tiffcp-32bpp-None-jpeg.sh \
67+
tiffcrop-32bpp-None-jpeg.sh
6568
endif
6669
else
6770
JPEG_DEPENDENT_CHECK_PROG=
@@ -211,7 +214,8 @@ TIFFIMAGES = \
211214
images/testfax4.tiff \
212215
images/deflate-last-strip-extra-data.tiff \
213216
images/custom_dir_EXIF_GPS.tiff \
214-
images/testfax3_bug_513.tiff
217+
images/testfax3_bug_513.tiff \
218+
images/32bpp-None.tiff
215219

216220
PNMIMAGES = \
217221
images/minisblack-1c-8b.pgm \

test/images/32bpp-None.tiff

12.9 KB
Binary file not shown.

test/tiff2rgba-32bpp-None-jpeg.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Generated file, master is Makefile.am
3+
. ${srcdir:-.}/common.sh
4+
infile="$srcdir/images/32bpp-None.tiff"
5+
outfile="o-tiff2rgba-32bpp-None-jpeg.tiff"
6+
f_test_convert "${TIFF2RGBA} -B 255 -n" $infile $outfile
7+
f_tiffinfo_validate $outfile

test/tiffcp-32bpp-None-jpeg.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Generated file, master is Makefile.am
3+
. ${srcdir:-.}/common.sh
4+
infile="o-tiff2rgba-32bpp-None-jpeg.tiff"
5+
outfile="o-tiffcp-32bpp-None-jpeg-YCbCr.tiff"
6+
f_test_convert "${TIFFCP} -c jpeg" $infile $outfile
7+
f_tiffinfo_validate $outfile

test/tiffcrop-32bpp-None-jpeg.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
# Generated file, master is Makefile.am
3+
. ${srcdir:-.}/common.sh
4+
infile="o-tiff2rgba-32bpp-None-jpeg.tiff"
5+
outfile="o-tiffcp-32bpp-None-jpeg-YCbCr.tiff"
6+
f_test_convert "${TIFFCROP} -c jpeg" $infile $outfile
7+
f_tiffinfo_validate $outfile

0 commit comments

Comments
 (0)