From 826fe38f52800a00863554391f8431460ae7e77b Mon Sep 17 00:00:00 2001 From: Akshay Arora Date: Sat, 30 Dec 2017 17:40:04 +0530 Subject: [PATCH] Update img_pil.py --- kivy/core/image/img_pil.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py index 18def762c..a405bacf7 100644 --- a/kivy/core/image/img_pil.py +++ b/kivy/core/image/img_pil.py @@ -4,7 +4,12 @@ PIL: PIL image loader __all__ = ('ImageLoaderPIL', ) -import Image as PILImage +try: + import Image as PILImage +except ImportError: + # for python3 + from PIL import Image as PILImage + from kivy.logger import Logger from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader