diff --git a/pysollib/mfxutil.py b/pysollib/mfxutil.py index b71d1254..8652f25b 100644 --- a/pysollib/mfxutil.py +++ b/pysollib/mfxutil.py @@ -41,18 +41,18 @@ from pysollib.settings import PACKAGE, TOOLKIT, USE_TILE Image = ImageTk = ImageOps = None if TOOLKIT == 'tk': try: # PIL - import Image - import ImageTk - import ImageOps + from PIL import Image + from PIL import ImageTk + from PIL import ImageOps except ImportError: Image = None else: # for py2exe - import GifImagePlugin - import PngImagePlugin - import JpegImagePlugin - import BmpImagePlugin - import PpmImagePlugin + from PIL import GifImagePlugin + from PIL import PngImagePlugin + from PIL import JpegImagePlugin + from PIL import BmpImagePlugin + from PIL import PpmImagePlugin Image._initialized = 2 USE_PIL = False if TOOLKIT == 'tk' and Image and Image.VERSION >= '1.1.7': diff --git a/scripts/cardset_viewer.py b/scripts/cardset_viewer.py index b1ea6a1b..741961fa 100755 --- a/scripts/cardset_viewer.py +++ b/scripts/cardset_viewer.py @@ -7,7 +7,7 @@ from glob import glob from math import sqrt, sin, cos, pi from Tkinter import * try: - import Image, ImageTk + from PIL import Image, ImageTk except ImportError: Image = None