diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-01 15:06:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 15:06:11 +0000 |
commit | 0e5d239f06110e875291b906e100de775c5d9658 (patch) | |
tree | ba71ae1be9fa23c1918d1f71674ba8a0db87830d /modules/images.py | |
parent | 458cca03915ba437ac65a2087965f3885e6022bc (diff) | |
parent | 8792be50078c2e89ac2fa8ff4e4c1ca82f140d45 (diff) | |
download | stable-diffusion-webui-gfx803-0e5d239f06110e875291b906e100de775c5d9658.tar.gz stable-diffusion-webui-gfx803-0e5d239f06110e875291b906e100de775c5d9658.tar.bz2 stable-diffusion-webui-gfx803-0e5d239f06110e875291b906e100de775c5d9658.zip |
Merge pull request #4086 from timntorres/3875-allow-disabling-png-info
Add PNG info to pngs only if option is enabled.
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 a0728553..ae705cbd 100644 --- a/modules/images.py +++ b/modules/images.py @@ -510,8 +510,9 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i if extension.lower() == '.png':
pnginfo_data = PngImagePlugin.PngInfo()
- for k, v in params.pnginfo.items():
- pnginfo_data.add_text(k, str(v))
+ if opts.enable_pnginfo:
+ for k, v in params.pnginfo.items():
+ pnginfo_data.add_text(k, str(v))
image.save(fullfn, quality=opts.jpeg_quality, pnginfo=pnginfo_data)
|