diff --git a/README.md b/README.md index fd88bc9..8ae29c0 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ You can find the latest released binary at the following links: ### For compiling/running from source: - Python 2.7 - Included in MacOS and Linux, follow the [official documentation](http://www.python.org/getit/windows/) to install on Windows. - PyQt4 - Please refer to official documentation for installing into your system. -- [Pillow](http://pypi.python.org/pypi/Pillow/) - For comic optimizations. Please refer to official documentation for installing into your system. +- [Pillow](http://pypi.python.org/pypi/Pillow/) 2.2.1+ - For comic optimizations. Please refer to official documentation for installing into your system. ## USAGE diff --git a/kcc/comic2panel.py b/kcc/comic2panel.py index 705dffe..c5ae4db 100644 --- a/kcc/comic2panel.py +++ b/kcc/comic2panel.py @@ -32,6 +32,9 @@ from multiprocessing import Pool, Queue, freeze_support try: # noinspection PyUnresolvedReferences from PIL import Image, ImageStat + if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))): + print "ERROR: Pillow 2.2.1 or newer is required!" + exit(1) except ImportError: print "ERROR: Pillow is not installed!" exit(1) diff --git a/kcc/image.py b/kcc/image.py index 1e56221..bc3c7fe 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -24,6 +24,9 @@ import os try: # noinspection PyUnresolvedReferences from PIL import Image, ImageOps, ImageStat, ImageChops + if tuple(map(int, ('2.2.1'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))): + print "ERROR: Pillow 2.2.1 or newer is required!" + exit(1) except ImportError: print "ERROR: Pillow is not installed!" exit(1)