ImageShow Module¶
The ImageShow Module is used to display images.
All default viewers convert the image to be shown to PNG format.
-
PIL.ImageShow.show(image, title=None, **options)[source]¶ Display a given image.
- Parameters
image – An image object.
title – Optional title. Not all viewers can display the title.
**options – Additional viewer options.
- Returns
Trueif a suitable viewer was found,Falseotherwise.
-
class
PIL.ImageShow.WindowsViewer[source]¶ The default viewer on Windows is the default system application for PNG files.
-
class
PIL.ImageShow.UnixViewer[source]¶ The following viewers may be registered on Unix-based systems, if the given command is found:
-
class
DisplayViewer¶ The ImageMagick
displaycommand.
-
class
GmDisplayViewer¶ The GraphicsMagick
gm displaycommand.
-
class
EogViewer¶ The GNOME Image Viewer
eogcommand.
-
class
XVViewer¶ The X Viewer
xvcommand. This viewer supports thetitleparameter.
-
class
-
PIL.ImageShow.register(viewer, order=1)[source]¶ The
register()function is used to register additional viewers.- Parameters
viewer – The viewer to be registered.
order – Zero or a negative integer to prepend this viewer to the list, a positive integer to append it.
-
class
PIL.ImageShow.Viewer[source]¶ Base class for viewers.
-
show(image, **options)[source]¶ The main function for displaying an image. Converts the given image to the target format and displays it.
-
format= None¶ The format to convert the image into.
-
options= {}¶ Additional options used to convert the image.
-