diff options
author | JJ <jjisnow@gmail.com> | 2022-09-16 20:48:22 +0000 |
---|---|---|
committer | JJ <jjisnow@gmail.com> | 2022-09-16 20:58:35 +0000 |
commit | de5bfdf9177d7035c76a890c241f8a5a32455cad (patch) | |
tree | db4bd69a3f75e2dd114f954e224d93c0c784460f /modules/extras.py | |
parent | e49b1c5d73ede818adb624590934f051b94493ac (diff) | |
download | stable-diffusion-webui-gfx803-de5bfdf9177d7035c76a890c241f8a5a32455cad.tar.gz stable-diffusion-webui-gfx803-de5bfdf9177d7035c76a890c241f8a5a32455cad.tar.bz2 stable-diffusion-webui-gfx803-de5bfdf9177d7035c76a890c241f8a5a32455cad.zip |
image info tab
* handles exceptions if jpeg jfif data not present
* removes further non-comment related exif data.
Diffstat (limited to 'modules/extras.py')
-rw-r--r-- | modules/extras.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/extras.py b/modules/extras.py index 38d6ec48..64b4f2b6 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -97,7 +97,7 @@ def run_extras(image, image_folder, gfpgan_visibility, codeformer_visibility, co return outputs, plaintext_to_html(info), ''
-def run_pnginfo(image):
+def run_image_info(image):
items = image.info
if "exif" in image.info:
@@ -111,8 +111,9 @@ def run_pnginfo(image): items['exif comment'] = exif_comment
- for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif']:
- del items[field]
+ for field in ['jfif', 'jfif_version', 'jfif_unit', 'jfif_density', 'dpi', 'exif',
+ 'loop', 'background', 'timestamp', 'duration']:
+ items.pop(field, None)
info = ''
|