From 2d0b6987a0e8ef37bf7b7cae426b85d872eefbed Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 30 Nov 2015 22:06:18 +1100 Subject: [PATCH] Changed ImageQt import of Image --- PIL/ImageQt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PIL/ImageQt.py b/PIL/ImageQt.py index b37177aff..a67dde8ee 100644 --- a/PIL/ImageQt.py +++ b/PIL/ImageQt.py @@ -16,7 +16,7 @@ # See the README file for information on usage and redistribution. # -import PIL +from PIL import Image from PIL._util import isPath from io import BytesIO @@ -69,7 +69,7 @@ def fromqimage(im): buffer.close() b.seek(0) - return PIL.Image.open(b) + return Image.open(b) def fromqpixmap(im): @@ -83,7 +83,7 @@ def fromqpixmap(im): # bytes_io.write(buffer.data()) # buffer.close() # bytes_io.seek(0) - # return PIL.Image.open(bytes_io) + # return Image.open(bytes_io) def align8to32(bytes, width, mode): """ @@ -125,7 +125,7 @@ def _toqclass_helper(im): else: im = str(im.toUtf8(), "utf-8") if isPath(im): - im = PIL.Image.open(im) + im = Image.open(im) if im.mode == "1": format = QImage.Format_Mono @@ -149,7 +149,7 @@ def _toqclass_helper(im): except SystemError: # workaround for earlier versions r, g, b, a = im.split() - im = PIL.Image.merge("RGBA", (b, g, r, a)) + im = Image.merge("RGBA", (b, g, r, a)) format = QImage.Format_ARGB32 else: raise ValueError("unsupported image mode %r" % im.mode)