From aa2521a9184b5c614971d3dc5987c9cd463157c6 Mon Sep 17 00:00:00 2001 From: Roman Gräf Date: Sun, 29 Nov 2020 23:12:29 +0100 Subject: allow jpeg uploads --- herrschwarzify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/herrschwarzify.py b/herrschwarzify.py index dc0eb7c..9340a08 100644 --- a/herrschwarzify.py +++ b/herrschwarzify.py @@ -43,7 +43,7 @@ def upload(): if 'file' not in request.files or not request.files["file"].filename: return redirect(url_for('index')) image: FileStorage = request.files["file"] - converted_image = herrschwarzify(Image.open(image.stream)) + converted_image = herrschwarzify(Image.open(image.stream).convert(OVERLAY.mode)) name = random_name() converted_image.save(f"uploads/{name}") return redirect(url_for('image_resource', image=name)) -- cgit