diff options
author | catboxanon <122327233+catboxanon@users.noreply.github.com> | 2023-05-24 20:41:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-24 20:41:22 +0000 |
commit | 7a1bbf99da7c9bad866a50890221e4e539e1025d (patch) | |
tree | ba76daa1b45f3a6691f3502811380a09fb6ba36c /modules/images.py | |
parent | a6e653be26cc05f4438145fa0082816e9fbbf5fc (diff) | |
download | stable-diffusion-webui-gfx803-7a1bbf99da7c9bad866a50890221e4e539e1025d.tar.gz stable-diffusion-webui-gfx803-7a1bbf99da7c9bad866a50890221e4e539e1025d.tar.bz2 stable-diffusion-webui-gfx803-7a1bbf99da7c9bad866a50890221e4e539e1025d.zip |
Cleaner image metadata read
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 8 |
1 files 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:
|