From ff97aa8e3c4fc6895379616fcca041ef35acc456 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 26 Jul 2010 08:10:10 +0000 Subject: [PATCH] better test coverage for tiff processing --- t/t106tiff.t | 10 ++++++++-- testimg/rgbatsep.tif | Bin 0 -> 262452 bytes 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 testimg/rgbatsep.tif diff --git a/t/t106tiff.t b/t/t106tiff.t index 2d228026..d62345a9 100644 --- a/t/t106tiff.t +++ b/t/t106tiff.t @@ -7,7 +7,7 @@ use Imager::Test qw(is_image is_image_similar test_image test_image_16 test_imag i_has_format("tiff") or plan skip_all => "no tiff support"; -plan tests => 213; +plan tests => 215; $|=1; # give us some progress in the test harness init_log("testout/t106tiff.log",1); @@ -511,7 +511,7 @@ SKIP: ok($im16->read(file => 'testimg/rgb16.tif'), "read 16-bit rgb"); is($im16->bits, 16, 'got a 16-bit image'); my $im16t = Imager->new; - ok($im16t->read(file => 'testimg/rgb16t.tif'), "ready 16-bit rgb tiled"); + ok($im16t->read(file => 'testimg/rgb16t.tif'), "read 16-bit rgb tiled"); is($im16t->bits, 16, 'got a 16-bit image'); is_image($im16, $im16t, 'check they match'); @@ -557,6 +557,12 @@ SKIP: or print "# ", $cmyka16->errstr, "\n"; is($cmyka16->bits, 16, "check we got the right type"); is_image_similar($rgba, $cmyka16, 10, "check image data"); + + # tiled, non-contig, should fallback to RGBA code + my $rgbatsep = Imager->new; + ok($rgbatsep->read(file => 'testimg/rgbatsep.tif'), + "read base rgba image"); + is_image($rgba, $rgbatsep, "check they match"); } { # read bi-level my $pbm = Imager->new; diff --git a/testimg/rgbatsep.tif b/testimg/rgbatsep.tif new file mode 100644 index 0000000000000000000000000000000000000000..f1f88f3af9a3ca02593017ab9192f48d94a96d7a GIT binary patch literal 262452 zcmeIxy-O@t0LI}nx(Qo^AeSUaa=|T9NGeN9$xXOg1SF)`(m;fpPQ!)R*;@K1Sc)G- ztSl`pZ3IiJU==L2$z*otmDp@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