The PIL show() method looks for the default viewer. How do I change this to a different viewer (of my choice)?

Peter J. Holzer hjp-python at hjp.at
Wed May 30 17:01:17 EDT 2018


On 2018-05-30 22:08:45 +0200, Paul St George wrote:
> Ha! No, my question was clumsy.
> 
> If I know the name of the viewer that I want to use (say for example:
> ‘ImageMagick’), where do I find the argument that should be used in a line
> of code such as this:
> 
> ImageShow.register(MyViewer("gwenview"), -1)
> 
> I want to replace ‘gwenview’ with the name of my favourite viewer (for
> example: ‘ImageMagick’).

If your favourite viewer is 'ImageMagick’, then the name is
'ImageMagick'. However, I doubt this is the case, since ImageMagick
isn't a viewer, it is a collection of programs for manipulating images.
The viewer included in the ImageMagick package is simply called
'display' (and it is already the default viewer in PIL, so you don't
have to do anything to use it).

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | hjp at hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20180530/dfca5fb4/attachment.sig>


More information about the Python-list mailing list