网络编程
位置:首页>> 网络编程>> Python编程>> 解决Python下imread,imwrite不支持中文的问题

解决Python下imread,imwrite不支持中文的问题

作者:阿杜依诺  发布时间:2022-11-15 06:46:23 

标签:Python,imread,imwrite

由以下函数代替该功能:


def cv_imread(file_path):
cv_img=cv2.imdecode(np.fromfile(file_path,dtype=np.uint8),-1)
return cv_img

def cv_imwrite(filename,src):
cv2.imencode('.jpg',src)[1].tofile(filename)

来源:https://blog.csdn.net/qq_40250862/article/details/81316366

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com