python image show()方法的预览问题

 

 

在windows下面使用PIL中Image的show()函数时,执行下列代码:

       from PIL import Image

       img = Image.open("1.png")

       img.show()

       发现图片不能够正常的显示,windows自带的图片查看器显示图片内容不存在。

       

       C:\Python27\lib\site-packages\PIL\ImageShow.py, 第99行替换为:

       return "start /wait %s && PING 127.0.0.1 -n 5 > NUL && del /f %s" % (file, file)

 
posted on 2016-05-23 16:47  最美代码  阅读(3729)  评论(0编辑  收藏  举报