Load comments from gif images to gather geninfo from gif outputs

This commit is contained in:
JaredTherriault 2023-09-04 17:37:48 -07:00
parent 5e16914a4e
commit 022639a145
No known key found for this signature in database
GPG Key ID: 4561DFACC87A4A95
1 changed files with 2 additions and 0 deletions

View File

@ -728,6 +728,8 @@ def read_info_from_image(image: Image.Image) -> tuple[str | None, dict]:
if exif_comment:
items['exif comment'] = exif_comment
geninfo = exif_comment
elif "comment" in items: # for gif
geninfo = items["comment"].decode('utf8', errors="ignore")
for field in IGNORED_INFO_KEYS:
items.pop(field, None)