From 2ca96a3fef81b91bba85d9b4a06be0eaeb615948 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 29 Jun 2021 08:34:42 +0100 Subject: [PATCH] add another test for tiff ifd pyramids test loading from a lower layer --- test/test-suite/test_foreign.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test-suite/test_foreign.py b/test/test-suite/test_foreign.py index 52bd7485..17e69ea6 100644 --- a/test/test-suite/test_foreign.py +++ b/test/test-suite/test_foreign.py @@ -421,6 +421,12 @@ class TestForeign: assert x.width == 72 assert abs(x.avg() - 117.3) < 1 + filename = temp_filename(self.tempdir, '.tif') + self.colour.write_to_file(filename, pyramid=True, subifd=True, compression="jpeg") + x = pyvips.Image.new_from_file(filename, subifd=1) + assert x.width == 72 + assert abs(x.avg() - 117.3) < 1 + filename = temp_filename(self.tempdir, '.tif') x = pyvips.Image.new_from_file(TIF_FILE) x = x.copy()