本地图片显示

  1. 系统自带的图片浏览器
from PIL import Image
img = Image.open('code_img.png')
img.show()
  1. matplotlib图片显示
from PIL import Image
import matplotlib.pyplot as plt
img = Image.open('code_img.png')
plt.figure('pic')
plt.imshow(img)
plt.axis('off') # 关闭坐标
plt.show()
posted @ 2021-08-29 18:32  该显示昵称已被使用了  阅读(44)  评论(0)    收藏  举报