浏览代码

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