Files
serveur-d-authentification/venv/lib/python3.10/site-packages/PIL/__pycache__/ImageShow.cpython-310.pyc

90 lines
9.9 KiB
Plaintext
Raw Normal View History

o
<00>Q<EFBFBD>jz'<00>@sLddlmZddlZddlZddlZddlZddlZddlmZddl m
Z
ddl m Z gZ d8d9d d<0E>Zd:d;dd<17>ZGdd<19>d<19>ZGdd<1B>de<10>ZejdkrRee<11>Gdd<1E>de<10>Zejdkrcee<13>Gd d!<21>d!eje<10>ZGd"d#<23>d#e<15>ZGd$d%<25>d%e<15>ZGd&d'<27>d'e<15>ZGd(d)<29>d)e<15>ZGd*d+<2B>d+e<15>Zejd,vr<>e<04>d-<2D>r<>ee<16>e<04>d.<2E>r<>ee<17>e<04>d/<2F>r<>ee<18>e<04>d0<64>r<>ee<19>e<04>d1<64>r<>ee<1A>Gd2d3<64>d3e<10>Zzdd4lmZWn e y<>Ynwee<1C>e!d5k<02>r$e"ej#<23>d6kr<>e$d7<64>e<06>%<25>e <0C>&ej#d<00><01>Z'e$ee'gej#d6d<02><00>R<00><00>Wd<00>dS1<00>swYdSdS)<<3C>)<01> annotationsN<73><01>quote)<01>Any<6E>)<01>Image<67>viewer<65>type[Viewer] | Viewer<65>order<65>int<6E>return<72>NonecCs@t|t<01>r t|t<03>r |<00>}|dkrt<04>|<00>dSt<04>d|<00>dS)a$
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:
Zero or a negative integer to prepend this viewer to the list,
a positive integer to append it.
rN)<07>
isinstance<EFBFBD>type<70>
issubclass<EFBFBD>Viewer<65>_viewers<72>append<6E>insert)rr
<00>r<00>p/home/sorel/systeme_gestion_cerfig/serveur-d-authentification/venv/lib/python3.10/site-packages/PIL/ImageShow.py<70>registers
r<00>image<67> Image.Image<67>title<6C>
str | None<6E>optionsr<00>boolcKs*tD]}|j|fd|i|<02><01>rdSqdS)a 
Display a given image.
:param image: An image object.
:param title: Optional title. Not all viewers can display the title.
:param \**options: Additional viewer options.
:returns: ``True`` if a suitable viewer was found, ``False`` otherwise.
rTF)r<00>show)rrrrrrrr3s
 <02>rc@sjeZdZUdZddd <09>Zd
Zd ed < iZd ed< ddd<0F>Zddd<13>Z ddd<15>Z
ddd<17>Z ddd<1A>Z d
S) rzBase class for viewers.rrrrr r cKsP|jdvs|jdkr|jdvst<02>|j<00>}|j|kr|<01>|<03>}|j|fi|<02><01>S)z<>
The main function for displaying an image.
Converts the given image to the target format and displays it.
)<02>1<>RGBA<42>PNG)zI;16<31>LA)<06>mode<64>formatr<00> getmodebase<73>convert<72>
show_image)<04>selfrr<00>baserrrrGs
 

z Viewer.showNrr$zdict[str, Any]cCs|jS)z3Return format name, or ``None`` to save as PGM/PPM.)r$<00>r(rrrr<00>
get_format^szViewer.get_format<61>file<6C>strcKs d}t|<03><01>)zj
Returns the command used to display the file.
Not implemented in the base class.
zunavailable in base viewer)<01>NotImplementedError)r(r,r<00>msgrrr<00> get_commandbszViewer.get_commandcCs|jdd|<00>|<01>i|j<02><01>S)z+Save to temporary file and return filename.r$Nr)<03>_dumpr+rr*rrr<00>
save_imagejszViewer.save_imagecKs|j|<00>|<01>fi|<02><01>S)zDisplay the given image.)<02> show_filer2<00>r(rrrrrr'nszViewer.show_image<67>pathcKs,tj<01>|<01>st<03>t<00>|j|fi|<02><01><01>dS)<02>%
Display given file.
r)<06>osr5<00>exists<74>FileNotFoundError<6F>systemr0<00>r(r5rrrrr3rs zViewer.show_file<6C>rrrrr r )rrr r<00>r,r-rrr r-)rrr r-<00>r5r-rrr r ) <0A>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr$<00>__annotations__rr+r0r2r'r3rrrrrBs

  



rc@<01>2eZdZdZdZddd<05>Zdd d <0C>Zddd<10>ZdS)<14> WindowsViewerzNThe default viewer on Windows is the default system application for PNG files.r!rT<><02>compress_level<65>save_allr,r-rrr cKsd|<01>d|<01>d<03>S)Nzstart "Pillow" /WAIT "z)" && ping -n 4 127.0.0.1 >NUL && del /f "<22>"r<00>r(r,rrrrr0<00>s<06><02>zWindowsViewer.get_commandr5r cKs8tj<01>|<01>st<03>tj|j|fi|<02><01>dttd<02>d<03>dS)r6T<>CREATE_NO_WINDOW)<02>shell<6C> creationflagsr)r7r5r8r9<00>
subprocess<EFBFBD>Popenr0<00>getattrr;rrrr3<00>s <06>zWindowsViewer.show_fileNr=r><00>r?r@rArBr$rr0r3rrrrrE<00> 

rE<00>win32c@rD)<14> MacViewerz2The default viewer on macOS using ``Preview.app``.r!rTrFr,r-rrr cKs(d}d|<03>dt|<01><01>dt|<01><01>d<05>}|S)Nzopen -a Preview.app<70>(<28> z; sleep 20; rm -f z)&r<00>r(r,r<00>commandrrrr0<00>s zMacViewer.get_commandr5r cKshtj<01>|<01>st<03>t<04>ddd|g<04>ttdd<05>ottd<06>}| r"tj p&t
<EFBFBD> d<07>}|r2t<04> |dd |g<04>d
S) r6<00>openz-az Preview.app<70>frozenF<6E>_MEIPASS<53>python3z-cz<import os, sys, time; time.sleep(20); os.remove(sys.argv[1])r) r7r5r8r9rN<00>callrP<00>sys<79>hasattr<74>
executable<EFBFBD>shutil<69>whichrO)r(r5r<00> pyinstallerr`rrrr3<00>s <02><04>zMacViewer.show_fileNr=r>rQrrrrrT<00>rRrT<00>darwinc@s4eZdZdZddd<04>Zejdd d <0C><04>Zdd d<0E>ZdS)<12>
UnixViewerr!rTrFr,r-rrr <00>tuple[str, str]cKsdS<00>NrrJrrr<00>get_command_ex<65>szUnixViewer.get_command_excKs(|j|fi|<02><01>d}|<03>dt|<01><01><00>S)NrrV)rhrrWrrrr0<00>szUnixViewer.get_commandN<64>r,r-rrr rfr=) r?r@rAr$r<00>abc<62>abstractmethodrhr0rrrrre<00>s 
 rec@<01>$eZdZdZddd <09>Zdd d <0A>ZdS)<11> XDGViewerz3
The freedesktop.org ``xdg-open`` command.
r,r-rrr rfcKsd}}||fS)N<>xdg-openr)r(r,rrXr`rrrrh<00>szXDGViewer.get_command_exr5r cKs"tj<01>|<01>st<03>t<04>d|g<02>dS)r6rnr<00>r7r5r8r9rNrOr;rrrr3<00>s zXDGViewer.show_fileNrir><00>r?r@rArBrhr3rrrrrm<00>s
rmc@<01>(eZdZdZ ddd d <0C>Zddd<10>ZdS)<14> DisplayViewerz`
The ImageMagick ``display`` command.
This viewer supports the ``title`` parameter.
Nr,r-rrrrr rfcK<01>&d}}|r|dt|<02><01><00>7}||fS)N<>displayz -title r<00>r(r,rrrXr`rrrrh<00>szDisplayViewer.get_command_exr5r cK<01>Htj<01>|<01>st<03>dg}|<02>d<02>}|r|d|g7}|<03>|<01>t<06>|<03>dS)r6rtrz-titler<00>r7r5r8r9<00>getrrNrO<00>r(r5r<00>argsrrrrr3<00><00> 
 

zDisplayViewer.show_filerg<00>r,r-rrrrr rfr>rprrrrrr<00>s
 <0C>rrc@rl)<11>GmDisplayViewerz*The GraphicsMagick ``gm display`` command.r,r-rrr rfcK<01>d}d}||fS)N<>gmz
gm displayr<00>r(r,rr`rXrrrrh<00>zGmDisplayViewer.get_command_exr5r cK<01>$tj<01>|<01>st<03>t<04>dd|g<03>dS)r6rrtrror;rrrr3 <00> zGmDisplayViewer.show_fileNrir>rprrrrr}<00>
r}c@rl)<11> EogViewerz'The GNOME Image Viewer ``eog`` command.r,r-rrr rfcKr~)N<>eogzeog -nrr<>rrrrhr<>zEogViewer.get_command_exr5r cKr<>)r6r<>z-nrror;rrrr3r<>zEogViewer.show_fileNrir>rprrrrr<>r<>r<>c@rq)<14>XVViewerzX
The X Viewer ``xv`` command.
This viewer supports the ``title`` parameter.
Nr,r-rrrrr rfcKrs)N<>xvz -name rrurrrrh-szXVViewer.get_command_exr5r cKrv)r6r<>rz-namerrwryrrrr37r{zXVViewer.show_filergr|r>rprrrrr<>'s
 <0C>
r<EFBFBD>)rSrdrnrtrr<>r<>c@seZdZdZd dd <09>Zd
S) <0C> IPythonViewerz!The viewer for IPython frontends.rrrrr r cKs t|<01>dS)Nr)<01>ipython_displayr4rrrr'WszIPythonViewer.show_imageNr<)r?r@rArBr'rrrrr<>Tsr<>)rt<00>__main__<5F>z.Syntax: python3 ImageShow.py imagefile [title])r)rr r
r r r rg)rrrrrrr r)(<28>
__future__rrjr7rarNr^<00>shlexr<00>typingr<00>rrrrrrE<00>platformrT<00>ABCrermrrr}r<>r<>rbr<><00>IPython.displayrtr<><00> ImportErrorr?<00>len<65>argv<67>print<6E>exitrY<00>imrrrr<00><module>sf      =

# 




 <02>
 $<24><04>