diff --git a/api.py b/api.py index 652d751..1a36f98 100644 --- a/api.py +++ b/api.py @@ -73,6 +73,8 @@ def upload(): img = run_action(ingredient.identifier, ingredient.options, img) except Exception as exception: return abort(400, exception) + if img.mode != "RGB": + img = img.convert("RGB") # add watermark (if enabled) img = watermark.paint(img)