summaryrefslogtreecommitdiff
path: root/cli/app/controllers/upload_controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/app/controllers/upload_controller.py')
-rw-r--r--cli/app/controllers/upload_controller.py4
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' })