mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Replaced tiff_deflate with tiff_adobe_deflate compression when saving
This commit is contained in:
parent
9dcb1f402c
commit
298600381f
|
@ -471,6 +471,14 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
with Image.open(out) as reloaded:
|
||||
assert reloaded.info["compression"] == "jpeg"
|
||||
|
||||
def test_tiff_deflate_compression(self, tmp_path):
|
||||
im = hopper("RGB")
|
||||
out = str(tmp_path / "temp.tif")
|
||||
im.save(out, compression="tiff_deflate")
|
||||
|
||||
with Image.open(out) as reloaded:
|
||||
assert reloaded.info["compression"] == "tiff_adobe_deflate"
|
||||
|
||||
def test_quality(self, tmp_path):
|
||||
im = hopper("RGB")
|
||||
out = str(tmp_path / "temp.tif")
|
||||
|
|
|
@ -1442,6 +1442,8 @@ def _save(im, fp, filename):
|
|||
elif compression == "tiff_jpeg":
|
||||
# OJPEG is obsolete, so use new-style JPEG compression instead
|
||||
compression = "jpeg"
|
||||
elif compression == "tiff_deflate":
|
||||
compression = "tiff_adobe_deflate"
|
||||
|
||||
libtiff = WRITE_LIBTIFF or compression != "raw"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user