فهرست منبع

Fix attribute error of _getexif

Kentaro Wada 6 سال پیش
والد
کامیت
3cc4199bbf
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  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