Skip to content

Commit

Permalink
Load comments from gif images to gather geninfo from gif outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
JaredTherriault committed Sep 5, 2023
1 parent 5e16914 commit 022639a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 022639a

Please sign in to comment.