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/server/decorators.py | |
| parent | 3fb522534cff61576ac58ae466a2752585b8c44e (diff) | |
flask app runs and js compiles
Diffstat (limited to 'cli/app/server/decorators.py')
| -rw-r--r-- | cli/app/server/decorators.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/app/server/decorators.py b/cli/app/server/decorators.py index 62eb839..2e6f9dd 100644 --- a/cli/app/server/decorators.py +++ b/cli/app/server/decorators.py @@ -6,7 +6,7 @@ import os from time import time from datetime import datetime import numpy as np -import cv2 as cv +from PIL import Image from flask import request, jsonify from werkzeug.utils import secure_filename @@ -85,7 +85,7 @@ def store_uploaded_image(param_name, store=False, uploaded_im_path='static/data/ nparr = np.fromstring(file.read(), np.uint8) # decode image - im = cv.imdecode(nparr, cv.IMREAD_COLOR) + im = Image.fromarray(nparr) kwargs['im'] = im if store: |
