From 7a1bbf99da7c9bad866a50890221e4e539e1025d Mon Sep 17 00:00:00 2001 From: catboxanon <122327233+catboxanon@users.noreply.github.com> Date: Wed, 24 May 2023 16:41:22 -0400 Subject: Cleaner image metadata read --- modules/images.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/images.py b/modules/images.py index 4e8cd993..d1801355 100644 --- a/modules/images.py +++ b/modules/images.py @@ -665,9 +665,13 @@ def read_info_from_image(image): items['exif comment'] = exif_comment geninfo = exif_comment - for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif', - 'loop', 'background', 'timestamp', 'duration']: + for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif', + 'loop', 'background', 'timestamp', 'duration', 'progressive', 'progression', + 'icc_profile', 'chromaticity']: + try: items.pop(field, None) + except KeyError: + pass if items.get("Software", None) == "NovelAI": try: -- cgit v1.2.1