author | Rodrigo Campos
<rodrigo@sdfg.com.ar> 2013-08-10 18:56:37 UTC |
committer | Rodrigo Campos
<rodrigo@sdfg.com.ar> 2013-08-13 08:59:16 UTC |
parent | 1c673aa0871a45a979445593eef281c727a8c847 |
galala | +5 | -1 |
diff --git a/galala b/galala index ceea46c..1b7a25c 100755 --- a/galala +++ b/galala @@ -29,7 +29,11 @@ exif_rotations = { def resize_img(img, x, y, dst): "Resizes the given image, and saves it to dst." img = pil_image.open(img) - for k, v in img._getexif().items(): + exif_items = [] + if img._getexif() is not None: + exif_items = img._getexif().items() + + for k, v in exif_items: if k in pil_exif.TAGS and pil_exif.TAGS[k] == 'Orientation': if v in exif_rotations: img = img.rotate(exif_rotations[v],