1.用scipy
import scipy
scipy.misc.imsave('test.jpg', img)
2.用PIL
from PIL import Image
im = Image.fromarray(img)
im.save("test.jpg")
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/
Python之从numpy.array保存图片
阅读 164
2022-07-18
1.用scipy
import scipy
scipy.misc.imsave('test.jpg', img)
2.用PIL
from PIL import Image
im = Image.fromarray(img)
im.save("test.jpg")
黄世宇/Shiyu Huang's Personal Page:https://huangshiyu13.github.io/
相关推荐
精彩评论(0)