faqts : Computers : Programming : Languages : Python : Common Problems : Images

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 12 people (42%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How does one display images in Python? When I use the .show method it does not seem to work.

May 18th, 2000 00:28
unknown unknown, Fredrik Lundh


maybe you don't have a BMP viewer installed?  try saving
a file as BMP, and run the "start" command on it from the
MS-DOS window:

    > python
    ...
    >>> import Image
    >>> im = Image.open("...")
    >>> im.save("myfile.bmp")
    >>> [ctrl-Z]
    > start myfile.bmp

if this doesn't work, check the file associations, or hack
Image.py so it uses another default format.