- 系统自带的图片浏览器
from PIL import Image
img = Image.open(‘code_img.png‘)
img.show()
- 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()
2023-11-01 22:00:04
from PIL import Image
img = Image.open(‘code_img.png‘)
img.show()
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()