changeset 6:0cd9a1362310

fix bug where PIL lives in different places
author Jeff Hammel <>
date Mon, 13 Dec 2010 20:08:15 -0800
parents c89738f3f417
children 230fb4ae30c7
files cropresize/
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cropresize/
+++ b/cropresize/
@@ -1,12 +1,15 @@
 #!/usr/bin/env python
 import sys
-from PIL import Image
+    import Image
+except ImportError:
+    from PIL import Image
 def crop_resize(image, size, exact_size=False):
     Crop out the proportional middle of the image and set to the desired size.
     * image: a PIL image object
     * size: a 2-tuple of (width,height);  at least one must be specified
     * exact_size: whether to scale up for smaller images
     If the image is bigger than the sizes passed, this works as expected.
--- a/
+++ b/
@@ -2,17 +2,17 @@ from setuptools import setup, find_packa
 import sys, os
     filename = os.path.join(os.path.dirname(__file__), 'README.txt')
     description = file(filename).read()
     description = ''
-version = '0.1.4'
+version = '0.1.5'
       description="crop and resize an image without doing the math yourself",
       classifiers=[], # Get strings from
       author='Jeff Hammel',