mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Adjusted ImageQt use of unicode() for 2/3 compatibility
This commit is contained in:
parent
414c3f8b3a
commit
3d52e797f8
|
@ -59,7 +59,10 @@ class ImageQt(QImage):
|
|||
# handle filename, if given instead of image name
|
||||
if hasattr(im, "toUtf8"):
|
||||
# FIXME - is this really the best way to do this?
|
||||
im = unicode(im.toUtf8(), "utf-8")
|
||||
if str is bytes:
|
||||
im = unicode(im.toUtf8(), "utf-8")
|
||||
else:
|
||||
im = str(im.toUtf8(), "utf-8")
|
||||
if isPath(im):
|
||||
im = Image.open(im)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user