From 1ab70c790bf9e3d162e02047e49fa3116270f546 Mon Sep 17 00:00:00 2001 From: Jonas Konschak <90077736+kanttouchthis@users.noreply.github.com> Date: Fri, 15 Jul 2022 01:24:04 +0200 Subject: [PATCH] save as png --- image_from_text.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/image_from_text.py b/image_from_text.py index 87c8a89..06cf691 100644 --- a/image_from_text.py +++ b/image_from_text.py @@ -27,9 +27,9 @@ def ascii_from_image(image: Image.Image, size: int = 128) -> str: def save_image(image: Image.Image, path: str): if os.path.isdir(path): - path = os.path.join(path, 'generated.jpg') - elif not path.endswith('.jpg'): - path += '.jpg' + path = os.path.join(path, 'generated.png') + elif not path.endswith('.png'): + path += '.png' print("saving image to", path) image.save(path) return image @@ -76,4 +76,4 @@ if __name__ == '__main__': image_path=args.image_path, models_root=args.models_root, fp16=args.fp16, - ) \ No newline at end of file + )