error test for bw compression on RGB file

This commit is contained in:
wiredfool 2013-11-05 20:59:57 -08:00
parent a4a9b36ed0
commit 1d6f6ffa10

View File

@ -212,3 +212,11 @@ def test_cmyk_save():
im.save(out, compression='tiff_adobe_deflate')
im2 = Image.open(out)
assert_image_equal(im, im2)
def test_bw_compression_wRGB():
im = lena('RGB')
out = tempfile('temp.tif')
assert_exception(IOError, lambda: im.save(out, compression='tiff_ccitt'))
assert_exception(IOError, lambda: im.save(out, compression='group3'))
assert_exception(IOError, lambda: im.save(out, compression='group4'))