import matplotlib.pyplot as plt
from matplotlib.image import imread
import tkinter.filedialog
from_Ad = tkinter.filedialog.askopenfilename()#获取文件路径,有弹窗提示
print(from_Ad)
img = imread(from_Ad)
plt
Python 打开图片
最新推荐文章于 2024-06-19 00:39:04 发布
这篇博客介绍了如何使用Python的PIL库打开、显示和处理图片,包括读取不同格式的图像文件,调整尺寸,颜色处理等基本操作。
摘要由CSDN通过智能技术生成