

Image moduleImageChops (“channel operations”) moduleImageCms moduleImageColor moduleImageDraw moduleImageEnhance moduleImageFile moduleImageFilter moduleImageFont moduleImageGrab moduleImageMath moduleImageMorph moduleImageOps moduleImagePalette moduleImagePath moduleImageQt moduleImageSequence moduleImageShow moduleImageStat moduleImageText moduleImageTk moduleImageTransform moduleImageWin module (Windows-only)ExifTags moduleTiffTags moduleJpegPresets modulePSDraw modulePixelAccess classfeatures moduleImageShow module¶TheImageShow module is used to display images.All default viewers convert the image to be shown to PNG format.
Display a given image.
image – An image object.
title – Optional title. Not all viewers can display the title.
**options – Additional viewer options.
True if a suitable viewer was found,False otherwise.
The default viewer on Windows is the default system application for PNG files.
The following viewers may be registered on Unix-based systems, if the given command is found:
The freedesktop.orgxdg-open command.
The ImageMagickdisplay command.This viewer supports thetitle parameter.
The GraphicsMagickgmdisplay command.
The GNOME Image Viewereog command.
The X Viewerxv command.This viewer supports thetitle parameter.
To provide maximum functionality on Unix-based systems, temporary files createdfrom images will not be automatically removed by Pillow.
Theregister() function is used to register additional viewers:
fromPILimportImageShowImageShow.register(MyViewer())# MyViewer will be used as a last resortImageShow.register(MySecondViewer(),0)# MySecondViewer will be prioritisedImageShow.register(ImageShow.XVViewer(),0)# XVViewer will be prioritised
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.
Base class for viewers.
The main function for displaying an image.Converts the given image to the target format and displays it.