在Python中显示来自控制台的图像
16lz
2021-01-22
What is the easiest way to show a .jpg
or .gif
image from Python console?
从Python控制台显示.jpg或.gif图像的最简单方法是什么?
I've got a Python console program that is checking a data set which contains links to images stored locally. How should I write the script so that it would display images pop-up graphical windows?
我有一个Python控制台程序正在检查一个数据集,其中包含本地存储的图像的链接。我应该如何编写脚本以便显示图像弹出图形窗口?
9 个解决方案
#1
42
Using the awesome Pillow library:
使用令人敬畏的枕头库:
>>> from PIL import Image
>>> img = Image.open('test.png')
>>> img.show()
This will open the image in your default image viewer.
这将在默认图像查看器中打开图像。
更多相关文章
- Python为8bit深度图像应用color map
- Tensorflow:恢复图形和模型,然后在单个图像上运行评估
- python的PIL绘制多行文本的图像。
- 铯:使用自己的OpenStreetMap服务器。:“未能获得图像块”错误
- 如何将图像加载到PictureBox;基于存储在DataBase中的图像位置
- 使用进度条延迟加载图像会使图像在显示时发生损坏
- Android 修改用户图像笔记
- 背景图像颜色检测与Android油漆。
- 想在android中使用node.js和socket.io发送图像