[问题] 如何检查图片是否和毁损

楼主: s4028600 (佑)   2019-07-29 00:57:14
我在网上爬到这个
https://www.dust8.com/2017/04/22/python-broken-image/
我将他给的代码存成py档
放在图片堆中执行
就闪一下消失了
想要读取所有资料夹下的图片
或是读取同资料夹的所有图片
我要如何改造这个代码
求教学
作者: alvinlin (林矜业)   2019-07-29 01:45:00
参考看看。自己再改改。不谢。import osimport shutilfrom time import sleepfrom PIL import Image,ImageTkimport tkinter as tkfrom tkinter import StringVardef show_jpg():root = tk.Tk()im=Image.open(imagefilename)img=ImageTk.PhotoImage(im)

Links booklink

Contact Us: admin [ a t ] ucptt.com