From 441af82dbd8e2d8cce5ebb22a5494a7b33f4daec Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Fri, 20 Jun 2025 11:15:05 +0800 Subject: [PATCH] fix: update EXIF metadata extraction method for better compatibility with non-JPEG formats --- py/utils/exif_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/utils/exif_utils.py b/py/utils/exif_utils.py index c4c79539..62e8e7f3 100644 --- a/py/utils/exif_utils.py +++ b/py/utils/exif_utils.py @@ -31,7 +31,7 @@ class ExifUtils: # Method 2: Check EXIF UserComment field if img.format not in ['JPEG', 'TIFF', 'WEBP']: # For non-JPEG/TIFF/WEBP images, try to get EXIF through PIL - exif = img._getexif() + exif = img.getexif() if exif and piexif.ExifIFD.UserComment in exif: user_comment = exif[piexif.ExifIFD.UserComment] if isinstance(user_comment, bytes):