diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-17 20:54:23 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-17 20:54:23 +0000 |
commit | 3a0d6b77295162146d0a8d04278804334da6f1b4 (patch) | |
tree | bf8310cc645475926f4315365c25020970885469 /modules/images.py | |
parent | 38b7186e6e3a4dffc93225308b822f0dae43a47d (diff) | |
download | stable-diffusion-webui-gfx803-3a0d6b77295162146d0a8d04278804334da6f1b4.tar.gz stable-diffusion-webui-gfx803-3a0d6b77295162146d0a8d04278804334da6f1b4.tar.bz2 stable-diffusion-webui-gfx803-3a0d6b77295162146d0a8d04278804334da6f1b4.zip |
make it so that PNG images with EXIF do not lose parameters in PNG info tab
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/images.py b/modules/images.py index c3a5fc8b..3b1c5f34 100644 --- a/modules/images.py +++ b/modules/images.py @@ -605,8 +605,9 @@ def read_info_from_image(image): except ValueError:
exif_comment = exif_comment.decode('utf8', errors="ignore")
- items['exif comment'] = exif_comment
- geninfo = exif_comment
+ if exif_comment:
+ items['exif comment'] = exif_comment
+ geninfo = exif_comment
for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
'loop', 'background', 'timestamp', 'duration']:
|