如何获取 PIL 图像的文件名?

时间:2021-02-19 15:38:59

标签: python image

from PIL import Image

img = Image.open("pic_1.png")
print(img.filename) #pic_1.png
#actual outcome:
#AttributeError: 'Image' object has no attribute 'get_filename'

我正在研究 Python 3.8。

0 个答案:

没有答案