Unverified Commit 4c562a98 authored by Vladimir Mandic's avatar Vladimir Mandic Committed by GitHub

convert rgba to rgb

some image format (e.g. jpg) do not support rgba
parent ea9bd9fc
......@@ -73,6 +73,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
if not save_normally:
os.makedirs(output_dir, exist_ok=True)
if processed_image.mode == 'RGBA':
processed_image = processed_image.convert("RGB")
processed_image.save(os.path.join(output_dir, filename))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment