Mercurial > public > sg101
diff core/image.py @ 893:3aecf9058130
Merge with upstream.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 17 Feb 2015 18:59:06 -0600 |
parents | 24fc302f9076 |
children |
line wrap: on
line diff
--- a/core/image.py Tue Feb 10 20:36:34 2015 -0600 +++ b/core/image.py Tue Feb 17 18:59:06 2015 -0600 @@ -102,7 +102,13 @@ """ if hasattr(im, '_getexif'): - exif = im._getexif() + try: + exif = im._getexif() + except IndexError: + # Work around issue seen in Pillow + # https://github.com/python-pillow/Pillow/issues/518 + exif = None + if exif and ORIENT_TAG in exif: orientation = exif[ORIENT_TAG] func = ORIENT_FUNCS.get(orientation)