📜  werkzeug.datastructures.filestorage 到 numpy - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:30.787000             🧑  作者: Mango

代码示例1
#read image file string data
filestr = request.files['file'].read()
#convert string data to numpy array
npimg = numpy.fromstring(filestr, numpy.uint8)
# convert numpy array to image
img = cv2.imdecode(npimg, cv2.CV_LOAD_IMAGE_UNCHANGED)