mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
compression in encoder info
This commit is contained in:
parent
83bd3291db
commit
7ece94edc7
|
@ -908,7 +908,7 @@ def _save(im, fp, filename):
|
|||
|
||||
ifd = ImageFileDirectory(prefix)
|
||||
|
||||
compression = im.info.get('compression','raw')
|
||||
compression = im.encoderinfo.get('compression',im.info.get('compression','raw'))
|
||||
libtiff = compression in ["tiff_ccitt", "group3", "group4",
|
||||
"tiff_jpeg", "tiff_adobe_deflate",
|
||||
"tiff_thunderscan", "tiff_deflate",
|
||||
|
@ -1005,6 +1005,7 @@ def _save(im, fp, filename):
|
|||
_fp = os.dup(fp.fileno())
|
||||
|
||||
blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ROWSPERSTRIP, ICCPROFILE] # ICC Profile crashes.
|
||||
|
||||
atts = dict([(k,v) for (k,(v,)) in ifd.items() if k not in blocklist])
|
||||
try:
|
||||
# pull in more bits from the original file, e.g x,y resolution
|
||||
|
|
Loading…
Reference in New Issue
Block a user