diff --git a/Tests/images/tiff_strip_planar_raw.tif b/Tests/images/tiff_strip_planar_raw.tif new file mode 100644 index 000000000..ab8b3c3f3 Binary files /dev/null and b/Tests/images/tiff_strip_planar_raw.tif differ diff --git a/Tests/images/tiff_strip_planar_raw_with_overviews.tif b/Tests/images/tiff_strip_planar_raw_with_overviews.tif new file mode 100644 index 000000000..e032c5c36 Binary files /dev/null and b/Tests/images/tiff_strip_planar_raw_with_overviews.tif differ diff --git a/Tests/images/tiff_tiled_planar_raw.tif b/Tests/images/tiff_tiled_planar_raw.tif new file mode 100644 index 000000000..2e3ecc811 Binary files /dev/null and b/Tests/images/tiff_tiled_planar_raw.tif differ diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index a8a893883..c92733859 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -422,8 +422,24 @@ class TestFileTiff(PillowTestCase): self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png") - def test_tiled_raw(self): - infile = "Tests/images/tiff_tiled_raw.tif" + def test_strip_planar_raw(self): + # gdal_translate -of GTiff -co INTERLEAVE=BAND tiff_strip_raw.tif tiff_strip_planar_raw.tiff + infile = "Tests/images/tiff_strip_planar_raw.tif" + im = Image.open(infile) + + self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png") + + def test_strip_planar_raw_with_overviews(self): + # gdaladdo tiff_strip_planar_raw2.tif 2 4 8 16 + infile = "Tests/images/tiff_strip_planar_raw_with_overviews.tif" + im = Image.open(infile) + + self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png") + + def test_tiled_planar_raw(self): + # gdal_translate -of GTiff -co TILED=YES -co BLOCKXSIZE=32 -co BLOCKYSIZE=32 -co INTERLEAVE=BAND \ + # tiff_tiled_raw.tif tiff_tiled_planar_raw.tiff + infile = "Tests/images/tiff_tiled_planar_raw.tif" im = Image.open(infile) self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png")