cv2.imdecode(np.fromfile(打开图片路径, dtype=np.uint8), cv2.COLOR_BGR2RGB) cv2.imencode('.jpg', 图像的array对象)[1].tofile(保存图片路径)