diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-06-01 19:49:46 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-06-01 19:49:46 +0200 |
| commit | 3bcae4c2cfbef73cac81cedbbe74426f17d90099 (patch) | |
| tree | ab168dd16429aa8ef5d3b3511b4be1a5dafc5ea9 /cli/app/controllers/upload_controller.py | |
| parent | 3fb522534cff61576ac58ae466a2752585b8c44e (diff) | |
flask app runs and js compiles
Diffstat (limited to 'cli/app/controllers/upload_controller.py')
| -rw-r--r-- | cli/app/controllers/upload_controller.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/controllers/upload_controller.py b/cli/app/controllers/upload_controller.py index 5463fc6..86f9f29 100644 --- a/cli/app/controllers/upload_controller.py +++ b/cli/app/controllers/upload_controller.py @@ -4,7 +4,7 @@ from werkzeug.datastructures import MultiDict from werkzeug.utils import secure_filename import os import numpy as np -import cv2 as cv +from PIL import Image from app.settings import app_cfg from app.sql.common import db, Session @@ -77,7 +77,7 @@ class UploadView(FlaskView): # decode image try: - im = cv.imdecode(nparr, cv.IMREAD_COLOR) + im = Image.fromarray(nparr) except: return jsonify({ 'status': 'error', 'error': 'Image parse error' }) |
