Hey guys help me please.
I have flask rest api that receive multipart/form-data as image and I want to use opencv to process it .
My problem is I can't read image with cv2.imdecode.
This function is return none so what's wrong.
imgFile = request.files['image']
imgBuffer = imgFile.read() # <class 'bytes'>
#b'\xc3\xbf\xc3\x98\xc3\xbf\xc3\xa0\x00\x10'
img = np.frombuffer(imgBuffer, dtype='uint8') # <class 'numpy.ndarray'>
#[195 191 195 152 195 191 195 160 0 16]
img = cv2.imdecode(img, cv2.IMREAD_COLOR) # <class 'NoneType'>
