mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
spaces.
This commit is contained in:
parent
d965257616
commit
42633d7a31
|
@ -1623,12 +1623,12 @@ class Image(object):
|
|||
open_fp = False
|
||||
if isPath(fp):
|
||||
filename = fp
|
||||
open_fp=True
|
||||
open_fp = True
|
||||
elif sys.version_info >= (3, 4):
|
||||
from pathlib import Path
|
||||
if isinstance(fp, Path):
|
||||
filename = str(fp.resolve())
|
||||
open_fp=True
|
||||
open_fp = True
|
||||
elif hasattr(fp, "name") and isPath(fp.name):
|
||||
# only set the name for metadata purposes
|
||||
filename = fp.name
|
||||
|
|
Loading…
Reference in New Issue
Block a user