mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Fixed None as TIFF compression argument
This commit is contained in:
parent
1e56ed8c00
commit
36b1afff26
|
@ -486,7 +486,7 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
pilim_load = Image.open(buffer_io)
|
||||
self.assert_image_similar(pilim, pilim_load, 0)
|
||||
|
||||
# save_bytesio()
|
||||
save_bytesio()
|
||||
save_bytesio('raw')
|
||||
save_bytesio("packbits")
|
||||
save_bytesio("tiff_lzw")
|
||||
|
|
|
@ -1396,8 +1396,9 @@ def _save(im, fp, filename):
|
|||
|
||||
ifd = ImageFileDirectory_v2(prefix=prefix)
|
||||
|
||||
compression = im.encoderinfo.get('compression',
|
||||
im.info.get('compression', 'raw'))
|
||||
compression = im.encoderinfo.get('compression', im.info.get('compression'))
|
||||
if compression is None:
|
||||
compression = 'raw'
|
||||
|
||||
libtiff = WRITE_LIBTIFF or compression != 'raw'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user