Commits

Bertrand Bordage  committed 42728cc

Compatibility with Pillow >= 2.1.0

  • Participants
  • Parent commits d766c46

Comments (0)

Files changed (1)

File cmsplugin_nivoslider/thumbnail_processors.py

 # Solution found there:
 # http://stackoverflow.com/questions/11960079/padded-fit-with-easy-thumbnails
 
-import ImageChops
+try:
+    from PIL import ImageChops  # Pillow >= 2.1.0
+except ImportError:
+    import ImageChops  # Pillow < 2.1.0 & PIL
 
 
 def pad_image(image, **kwargs):