简体   繁体   English

IDLE Python / PIL模块 - 默认图像查看器

[英]IDLE Python / PIL Module - Default Image Viewer

I'm using IDLE Python on Win7 x64 (x86 version of Python though as PIL doesn't work with x64) and it's working properly, but I have a problem in that the show() method for an image opens in what it must think is the default image viewer (in my case, Photoshop). 我在Win7 x64上使用IDLE Python(x86版本的Python,虽然PIL不能与x64一起使用)并且它正常工作,但是我有一个问题,即图像的show()方法打开了它必须要考虑的内容是默认的图像查看器(在我的例子中,Photoshop)。

The documentation for the PIL module states that show() "displays it using an external viewer (usually xv on Unix, and the paint program on Windows)". PIL模块的文档声明show()“使用外部查看器(通常是Unix上的xv和Windows上的绘图程序)显示它”。 [link] [链接]

Photoshop is not my default image viewer in Windows (Picasa is), so that doesn't explain it. Photoshop不是我在Windows中的默认图像查看器(Picasa是),因此不解释它。

I have a netbook running Ubuntu and that works fine - it opens a small image viewer window, not a massive 64-bit image editing application! 我有一台运行Ubuntu的上网本,工作正常 - 它打开一个小的图像查看器窗口,而不是一个庞大的64位图像编辑应用程序!

Does anyone know of a reason for this, and how I can change the image viewer IDLE uses to a more sensible one? 有没有人知道这个的原因,以及如何将IDLE使用的图像查看器更改为更合理的图像?

PIL show() converts images to Bitmap files and opens them with the default program that is associated with .bmp files, in this case Photoshop. PIL show()将图像转换为位图文件,并使用与.bmp文件关联的默认程序打开它们,在本例中为Photoshop。

Solution: change the default viewer for .bmp files to an image viewer. 解决方案:将.bmp文件的默认查看器更改为图像查看器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM