# HG changeset patch # User Brian Neal # Date 1412460416 18000 # Node ID 36d988b800c23f87aa52c27a3417657752a0a0ca # Parent f31168465953a371aaf8cb2ef4a1b0cebab7ef07 Issue #74, fix bug in 234726f. diff -r f31168465953 -r 36d988b800c2 core/image.py --- 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)