mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Fix for saving to io.BytesIO()
This commit is contained in:
parent
9da99dee8d
commit
dd3a46520c
|
@ -1128,8 +1128,12 @@ def _save(im, fp, filename):
|
|||
print (ifd.items())
|
||||
_fp = 0
|
||||
if hasattr(fp, "fileno"):
|
||||
fp.seek(0)
|
||||
_fp = os.dup(fp.fileno())
|
||||
import io
|
||||
try:
|
||||
fp.seek(0)
|
||||
_fp = os.dup(fp.fileno())
|
||||
except io.UnsupportedOperation:
|
||||
pass
|
||||
|
||||
# ICC Profile crashes.
|
||||
blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ROWSPERSTRIP, ICCPROFILE]
|
||||
|
|
Loading…
Reference in New Issue
Block a user