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 method is mainly intended for debugging purposes.
On Unix platforms, this method saves the image to a temporary PPM file, and calls the xv utility.
On Windows, it saves the image to a temporary BMP file, and uses the standard BMP display utility to show it (usually Paint).
Parameters: title – Optional title to use for the image window, where possible. command – command used to show the image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With