changeset 839:36d988b800c2

Issue #74, fix bug in 234726f.
author Brian Neal <bgneal@gmail.com>
date Sat, 04 Oct 2014 17:06:56 -0500
parents f31168465953
children 7735f8a6bd1f
files core/image.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/image.py	Sat Oct 04 16:40:17 2014 -0500
+++ b/core/image.py	Sat Oct 04 17:06:56 2014 -0500
@@ -104,6 +104,9 @@
     if hasattr(im, '_getexif'):
         exif = im._getexif()
         if exif and ORIENT_TAG in exif:
-            return (True, ORIENT_FUNCS[ORIENT_TAG](im))
+            orientation = exif[ORIENT_TAG]
+            func = ORIENT_FUNCS.get(orientation)
+            if func:
+                return (True, func(im))
 
     return (False, im)