diff --git a/face_recognition/app/app.py b/face_recognition/app/app.py index 5126cf3..8af57ca 100644 --- a/face_recognition/app/app.py +++ b/face_recognition/app/app.py @@ -86,7 +86,7 @@ def check_id(id): return known def save_img(encoded_data, filename): - nparr = np.fromstring(base64.b64decode(encoded_data), np.uint8) + nparr = np.fromstring(base64.urlsafe_b64decode(encoded_data), np.uint8) img = cv2.imdecode(nparr, cv2.IMREAD_ANYCOLOR) return cv2.imwrite(filename, img)