mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Merge pull request #3310 from radarhere/compression
Fixed None as TIFF compression argument
This commit is contained in:
commit
84b4905a94
|
@ -496,7 +496,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")
|
||||
|
|
|
@ -1404,8 +1404,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