summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-18 21:38:57 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-18 21:38:57 +0200
commit93156d3ea0ffe2cd36c03ddedb4c65c85d493850 (patch)
treef4ea121ee02f55320616e39df3a8b9cc6f1bf330
parent5269bd720bbc44e947e456b7af1ab9518a1b8812 (diff)
update rotation enums
-rwxr-xr-xbin/pyggle8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/pyggle b/bin/pyggle
index 8b9196f..81c8435 100755
--- a/bin/pyggle
+++ b/bin/pyggle
@@ -28,11 +28,11 @@ def rotate_image(image, exif_tag):
orientation = exif_tag["Image Orientation"].values
if 3 in orientation:
- image = image.transpose(Image.ROTATE_180)
+ image = image.transpose(Image.Transpose.ROTATE_180)
if 6 in orientation:
- image = image.transpose(Image.ROTATE_270)
+ image = image.transpose(Image.Transpose.ROTATE_270)
if 8 in orientation:
- image = image.transpose(Image.ROTATE_90)
+ image = image.transpose(Image.Transpose.ROTATE_90)
return image
@@ -403,7 +403,7 @@ class Thumbnail:
latref = self.exif_tag["GPS GPSLatitudeRef"].values[0]
lon = self.exif_tag["GPS GPSLongitude"]
lonref = self.exif_tag["GPS GPSLongitudeRef"].values[0]
- except KeyError:
+ except (KeyError, IndexError):
return
try: