when I display an image with PIL Image it opens an imagemagick window but the title is some gibberish name like 'tmpWbfj48Bfjf'. How do I make the image filename to be the title of the viewer window?
when I display an image with PIL Image it opens an imagemagick window but the title is some gibberish name like 'tmpWbfj48Bfjf'. How do I make the image filename to be the title of the viewer window?
Use the title attribute: Image.show(title="Your Title Here" [...]
From the documentation:
Image.show(title=None, command=None) Displays this image. This methodis mainly intended for debugging purposes.
On Unix platforms, this method saves the image to a temporary PPMfile, and calls the xv utility.
On Windows, it saves the image to a temporary BMP file, and uses thestandard BMP display utility to show it (usually Paint).
Parameters: title – Optional title to use for the image window, wherepossible. command – command used to show the image