From 83bd3291dbbf4cafcaf2c9cb7599bc54fd88a66d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 21 Oct 2013 09:29:51 -0700 Subject: [PATCH] tests for the actual compression method of the compressed file --- Tests/test_file_libtiff.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 037fc022d..516192625 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -92,6 +92,7 @@ def test_g4_write(): assert_equal(reread.size,(500,500)) _assert_noerr(reread) assert_image_equal(reread, rot) + assert_equal(reread.info['compression'], 'group4') assert_false(orig.tobytes() == reread.tobytes()) @@ -105,3 +106,12 @@ def test_adobe_deflate_tiff(): assert_no_exception(lambda: im.load()) +def test_g3_compression(): + i = Image.open('Tests/images/lena_g4_500.tif') + out = tempfile("temp.tif") + i.save(out, compression='group3') + + reread = Image.open(out) + assert_equal(reread.info['compression'], 'group3') + assert_image_equal(reread, i) +