推荐使用matplotlib
:
1 2 3 |
import matplotlib matplotlib.image.imsave('xxx.png', array) |
这是对应解释:
1 2 3 4 5 6 7 |
Arguments: *fname*: A string containing a path to a filename, or a Python file-like object. If *format* is *None* and *fname* is a string, the output format is deduced from the extension of the filename. *arr*: An MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA) array. |
保存的图片类似彩图。
当然,OpenCV
也行:
1 2 3 4 |
import cv2 import numpy as np cv2.imwrite("xxx.png", array) |
本文最后更新于2021年12月31日,已超过 1 年没有更新,如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢!
最新评论
大佬 http://ffflyy22.xyz/apps/fly.html 这是我试着创的站 但苹果手机安装后 执行都卡死 想请问是哪边出问题 可以的话 我提供网页编码寄给您 跪求协助…
马大佬您好 自己弄了一个苹果站 但测试安装不能用 连夏时也没法 能否与您交流下呢 我邮箱 ghostchat1@protonmail.com 跪求大佬T.T
该评论为私密评论
该评论为私密评论
该评论为私密评论
大佬 误传了一个文件 可以帮忙删除一下吗
aaaaa 我
我的也是