mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 22:52:12 -03:00
fix: update EXIF metadata extraction method for better compatibility with non-JPEG formats
This commit is contained in:
@@ -31,7 +31,7 @@ class ExifUtils:
|
|||||||
# Method 2: Check EXIF UserComment field
|
# Method 2: Check EXIF UserComment field
|
||||||
if img.format not in ['JPEG', 'TIFF', 'WEBP']:
|
if img.format not in ['JPEG', 'TIFF', 'WEBP']:
|
||||||
# For non-JPEG/TIFF/WEBP images, try to get EXIF through PIL
|
# 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:
|
if exif and piexif.ExifIFD.UserComment in exif:
|
||||||
user_comment = exif[piexif.ExifIFD.UserComment]
|
user_comment = exif[piexif.ExifIFD.UserComment]
|
||||||
if isinstance(user_comment, bytes):
|
if isinstance(user_comment, bytes):
|
||||||
|
|||||||
Reference in New Issue
Block a user