From 8048bbc7a2c82d8342c3372690ccd3c9a6359425 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 18 Jul 2015 00:07:04 +0200 Subject: [PATCH] Add tests for TIFF input with Alpha channel Update uclouvain/openjpeg#322 --- src/bin/jp2/converttif.c | 1 + tests/nonregression/test_suite.ctest.in | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/bin/jp2/converttif.c b/src/bin/jp2/converttif.c index 21bb11f8..d93e5f53 100644 --- a/src/bin/jp2/converttif.c +++ b/src/bin/jp2/converttif.c @@ -977,6 +977,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters) { planes[j] = image->comps[j].data; } + image->comps[numcomps - 1].alpha = (OPJ_UINT16)(1 - (numcomps & 1)); strip_size = TIFFStripSize(tif); diff --git a/tests/nonregression/test_suite.ctest.in b/tests/nonregression/test_suite.ctest.in index 0a3645eb..053d9318 100644 --- a/tests/nonregression/test_suite.ctest.in +++ b/tests/nonregression/test_suite.ctest.in @@ -98,6 +98,9 @@ opj_compress -i @INPUT_NR_PATH@/flower-rgb-planar-10.tif -o @TEMP_PATH@/flower-r opj_compress -i @INPUT_NR_PATH@/flower-rgb-planar-12.tif -o @TEMP_PATH@/flower-rgb-planar-12.tif.jp2 opj_compress -i @INPUT_NR_PATH@/flower-rgb-planar-14.tif -o @TEMP_PATH@/flower-rgb-planar-14.tif.jp2 opj_compress -i @INPUT_NR_PATH@/flower-rgb-planar-16.tif -o @TEMP_PATH@/flower-rgb-planar-16.tif.jp2 +opj_compress -i @INPUT_NR_PATH@/basn6a08.tif -o @TEMP_PATH@/basn6a08.tif.jp2 +opj_compress -i @INPUT_NR_PATH@/basn4a08.tif -o @TEMP_PATH@/basn4a08.tif.jp2 + # DECODER TEST SUITE opj_decompress -i @INPUT_NR_PATH@/Bretagne2.j2k -o @TEMP_PATH@/Bretagne2.j2k.pgx -- 2.40.0