diff options
author | Thomas Bernard <miniupnp@free.fr> | 2020-03-06 00:19:42 +0100 |
---|---|---|
committer | Thomas Bernard <miniupnp@free.fr> | 2020-03-07 11:46:20 +0100 |
commit | 5f84fefcf59d4f883cdccd6547fd571944e58ce5 (patch) | |
tree | 554cb74127ca63d1c0eb9ef1148038e859f437d5 /test | |
parent | 622492cb31d405e56267c1a0a026b5a63f18fb66 (diff) | |
download | libtiff-git-5f84fefcf59d4f883cdccd6547fd571944e58ce5.tar.gz |
ppm2tiff: Add test for 16bpc PPM
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/Makefile.am | 1 | ||||
-rw-r--r-- | test/common.sh | 3 | ||||
-rw-r--r-- | test/images/rgb-3c-16b.ppm | bin | 0 -> 142305 bytes | |||
-rwxr-xr-x | test/ppm2tiff_ppm.sh | 6 |
5 files changed, 10 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 53a5195d..e124b234 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -143,6 +143,7 @@ set(GIFIMAGES set(PNMIMAGES images/minisblack-1c-8b.pgm images/miniswhite-1c-1b.pbm + images/rgb-3c-16b.ppm images/rgb-3c-8b.ppm) # All uncompressed image files @@ -353,6 +354,7 @@ add_convert_test(gif2tiff palette "" "images/palette-1c-8b.gif" TRUE) # PPM add_convert_test(ppm2tiff miniswhite "" "images/miniswhite-1c-1b.pbm" TRUE) add_convert_test(ppm2tiff minisblack "" "images/minisblack-1c-8b.pgm" TRUE) +add_convert_test(ppm2tiff rgb "" "images/rgb-3c-16b.ppm" TRUE) add_convert_test(ppm2tiff rgb "" "images/rgb-3c-8b.ppm" TRUE) # tiffcp diff --git a/test/Makefile.am b/test/Makefile.am index c3ab3ec3..bb01cd82 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -186,6 +186,7 @@ TIFFIMAGES = \ PNMIMAGES = \ images/minisblack-1c-8b.pgm \ images/miniswhite-1c-1b.pbm \ + images/rgb-3c-16b.ppm \ images/rgb-3c-8b.ppm # This list should include all of the files in the 'images' diff --git a/test/common.sh b/test/common.sh index 5bebcd37..0219ab3a 100644 --- a/test/common.sh +++ b/test/common.sh @@ -46,10 +46,11 @@ IMG_LZW_SINGLE_STROP=${IMAGES}/lzw-single-strip.tiff IMG_MINISWHITE_1C_1B_PBM=${IMAGES}/miniswhite-1c-1b.pbm IMG_MINISBLACK_1C_8B_PGM=${IMAGES}/minisblack-1c-8b.pgm +IMG_RGB_3C_16B_PPM=${IMAGES}/rgb-3c-16b.ppm 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}" +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} ${IMG_RGB_3C_16B}" # # Test a simple convert-like command. diff --git a/test/images/rgb-3c-16b.ppm b/test/images/rgb-3c-16b.ppm Binary files differnew file mode 100644 index 00000000..c1cd4b64 --- /dev/null +++ b/test/images/rgb-3c-16b.ppm diff --git a/test/ppm2tiff_ppm.sh b/test/ppm2tiff_ppm.sh index e213a71d..576ab3e0 100755 --- a/test/ppm2tiff_ppm.sh +++ b/test/ppm2tiff_ppm.sh @@ -1,6 +1,10 @@ #!/bin/sh . ${srcdir:-.}/common.sh infile="$IMG_RGB_3C_8B_PPM" -outfile="o-ppm2tiff_ppm.tiff" +outfile="o-ppm2tiff_8b_ppm.tiff" +f_test_convert "$PPM2TIFF" $infile $outfile +f_tiffinfo_validate $outfile +infile="$IMG_RGB_3C_16B_PPM" +outfile="o-ppm2tiff_16b_ppm.tiff" f_test_convert "$PPM2TIFF" $infile $outfile f_tiffinfo_validate $outfile |