PIL Image模块 show函数不能正常显示图片

在win7下面使用PIL中Image的show()函数时,执行下列代码: from PIL import Image imgImage.open("G:\1.png")


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

       from PIL import Image

       img = Image.open("G:\\1.png")

       img.show()

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

       解决方法:(X为python的安装盘符)

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

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

发布者:admin,转转请注明出处:http://www.yc00.com/web/1733938268a3733269.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信