How to get the file name of a PIL image?

前端 未结 0 1654
别跟我提以往
别跟我提以往 2021-02-19 22:57
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_f         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题