Browse Source

Fix attribute error of _getexif

Kentaro Wada 6 năm trước cách đây
mục cha
commit
3cc4199bbf
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      labelme/app.py

+ 5 - 1
labelme/app.py

@@ -1563,7 +1563,11 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
 
 
 def apply_exif_orientation(image):
-    exif = image._getexif()
+    try:
+        exif = image._getexif()
+    except AttributeError:
+        exif = None
+
     if exif is None:
         return image