Use read_info_from_image in postprocessing

Avoids bad keys such as `exif` ending up in the "PNG info" passed forward
This commit is contained in:
Aarni Koskela 2023-07-03 13:08:28 +03:00
parent fab73f2e7d
commit 08f9b705cd
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ def run_postprocessing(extras_mode, image, image_folder, input_dir, output_dir,
for image, name in zip(image_data, image_names):
shared.state.textinfo = name
existing_pnginfo = image.info or {}
parameters, existing_pnginfo = images.read_info_from_image(image)
if parameters:
existing_pnginfo["parameters"] = parameters
pp = scripts_postprocessing.PostprocessedImage(image.convert("RGB"))