PIL image show() doesn't work on windows 7

倾然丶 夕夏残阳落幕 提交于 2019-11-29 05:52:09

Ok, found a solution here:

import webbrowser
webbrowser.open('image.png')

It opens the default viewer, not the browser, on my machine.

Also, there is os.startfile.

Nikhil George

If you want it to be opened by MS paint only, you can use:

start /wait mspaint %s && del /f %s" % (file, file)

The /wait is not having any effect when the file name is specified directly.

When Photo Viewer does appear, Go to menu on top ->Open->Choice Program-> Select Paint
On Spanish -> Abrir-> Elegir Programa -> seleccionar Paint

image reference: image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!