mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #6078 from radarhere/imageshow
This commit is contained in:
commit
96516ce5f1
|
@ -23,6 +23,9 @@ All default viewers convert the image to be shown to PNG format.
|
|||
.. autoclass:: PIL.ImageShow.EogViewer
|
||||
.. autoclass:: PIL.ImageShow.XVViewer
|
||||
|
||||
To provide maximum functionality on Unix-based systems, temporary files created
|
||||
from images will not be automatically removed by Pillow.
|
||||
|
||||
.. autofunction:: PIL.ImageShow.register
|
||||
.. autoclass:: PIL.ImageShow.Viewer
|
||||
:member-order: bysource
|
||||
|
|
|
@ -25,7 +25,12 @@ _viewers = []
|
|||
|
||||
def register(viewer, order=1):
|
||||
"""
|
||||
The :py:func:`register` function is used to register additional viewers.
|
||||
The :py:func:`register` function is used to register additional viewers::
|
||||
|
||||
from PIL import ImageShow
|
||||
ImageShow.register(MyViewer()) # MyViewer will be used as a last resort
|
||||
ImageShow.register(MySecondViewer(), 0) # MySecondViewer will be prioritised
|
||||
ImageShow.register(ImageShow.XVViewer(), 0) # XVViewer will be prioritised
|
||||
|
||||
:param viewer: The viewer to be registered.
|
||||
:param order:
|
||||
|
|
Loading…
Reference in New Issue
Block a user