Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/PIL/__pycache__/ImageTk.cpython-37.pyc

113 lines
7.6 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
(U<>]<5D>$<00>@s<>ddlZddlmZddlmZejjdkr6ddlZnddlZda dd<07>Z
dd <09>Z Gd
d <0B>d e <0C>Z Gd d <0A>d e <0C>Zdd<0F>Zdd<11>ZdS)<12>N)<01>BytesIO<49>)<01>Image<67>cCsPtdkrLy(t<01>dd<02>}tjd|jjd<04>daWntjk
rJdaYnXtS)N<>1)rrzPIL:%d)<01>datarr)<08> _pilbitmap_okr<00>new<65>tkinter<65> BitmapImage<67>im<69>id<69>TclError)r <00>r<00>//tmp/pip-install-pc7tm5jb/Pillow/PIL/ImageTk.py<70>_pilbitmap_check-s 
rcCs@d}d|kr|<00>d<01>}nd|kr.t|<00>d<02><01>}|r<t<02>|<01>SdS)N<>filer)<04>poprr<00>open)<02>kw<6B>sourcerrr<00>_get_image_from_kw9s rc@sDeZdZdZddd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>Zdd d<0E>Z dS)<11>
PhotoImagea3
A Tkinter-compatible photo image. This can be used
everywhere Tkinter expects an image object. If the image is an RGBA
image, pixels having alpha 0 are treated as transparent.
The constructor takes either a PIL image, or a mode and a size.
Alternatively, you can use the **file** or **data** options to initialize
the photo image object.
:param image: Either a PIL image, or a mode string. If a mode string is
used, a size must also be given.
:param size: If the first argument is a mode string, this defines the size
of the image.
:keyword file: A filename to load the image from (using
``Image.open(file)``).
:keyword data: An 8-bit string containing image data (as loaded from an
image file).
NcKs<>|dkrt|<03>}t|d<01>rxt|d<02>rx|j}|dkr`|<01><03>y |jj}Wntk
r^d}YnX|j}|\|d<|d<n|}d}|dkr<>t<07>|<04>}||_ ||_
t j f|<03>|_ |j j|_|r<>|<00>|<01>dS)N<>mode<64>size<7A>P<>RGB<47>width<74>height)r<00>Lr<00>RGBA)r<00>hasattrr<00>loadZpalette<74>AttributeErrorrrZ getmodebase<73>_PhotoImage__mode<64>_PhotoImage__sizer
r<00>_PhotoImage__photo<74>tk<74>paste)<05>self<6C>imagerrrrrr<00>__init__[s, 


zPhotoImage.__init__cCs@|jj}d|j_y|jj<02>dd|<01>Wntk
r:YnXdS)Nr*<00>delete)r&<00>namer'<00>call<6C> Exception)r)r-rrr<00>__del__{s zPhotoImage.__del__cCs
t|j<01>S)z<>
Get the Tkinter photo image identifier. This method is automatically
called by Tkinter whenever a PhotoImage object is passed to a Tkinter
method.
:return: A Tkinter photo image identifier (a string).
)<02>strr&)r)rrr<00>__str__<5F>szPhotoImage.__str__cCs
|jdS)zU
Get the width of the image.
:return: The width, in pixels.
r)r%)r)rrrr<00>szPhotoImage.widthcCs
|jdS)zW
Get the height of the image.
:return: The height, in pixels.
r)r%)r)rrrr<00>szPhotoImage.heightc Cs6|<01><00>|j}|<03><02>r(|j|jkr(|}n|<03>|j|j<06>}|<03>||<03>|jj }y|<05>
d|j|j <0B>Wn<>t j k
<EFBFBD>r0y<>ddlm}yLt|d<04>r<>ddlm}|<07>}|<06>t|<08>d|j<16><02>d<02>n|<06>|<05><17>d<02>Wn$tk
r<EFBFBD>|<06>t |<05>d<05>YnX|<05>
d|j|j <0B>Wn ttt j fk
<EFBFBD>r*<00>YnXYnXdS) a)
Paste a PIL image into the photo image. Note that this can
be very slow if the photo image is displayed.
:param im: A PIL image. The size must match the target region. If the
mode does not match, the image is converted to the mode of
the bitmap image.
:param box: A 4-tuple defining the left, upper, right, and lower pixel
coordinate. See :ref:`coordinate-system`. If None is given
instead of a tuple, all of the image is assumed.
ZPyImagingPhotor)<01>
_imagingtk<EFBFBD>interpr)<01>FFIZ uintptr_tN)r"r Zisblockrr$Z new_blockrZconvert2r&r'r.r r
r<00>r3r!Zcffir5Ztkinit<69>int<6E>castr4Z
interpaddrr#<00> ImportError) r)r Zboxr*<00>blockr'r3r5<00>ffirrrr(<00>s.  
 zPhotoImage.paste)NN)N)
<EFBFBD>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r+r0r2rrr(rrrrrGs

rc@s:eZdZdZd dd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>ZdS)r a<>
A Tkinter-compatible bitmap image. This can be used everywhere Tkinter
expects an image object.
The given image must have mode "1". Pixels having value 0 are treated as
transparent. Options, if any, are passed on to Tkinter. The most commonly
used option is **foreground**, which is used to specify the color for the
non-transparent parts. See the Tkinter documentation for information on
how to specify colours.
:param image: A PIL image.
NcKsd|dkrt|<02>}|j|_|j|_t<05>rF|<01><06>d|jj|d<||_ n |<01>
<EFBFBD>|d<t j f|<02>|_ dS)NzPIL:%dr)rrZ_BitmapImage__moder<00>_BitmapImage__sizerr"r r Z_BitmapImage__imZtobitmapr
r <00>_BitmapImage__photo)r)r*rrrrr+<00>s zBitmapImage.__init__cCs@|jj}d|j_y|jj<02>dd|<01>Wntk
r:YnXdS)Nr*r,)rAr-r'r.r/)r)r-rrrr0<00>s zBitmapImage.__del__cCs
|jdS)zU
Get the width of the image.
:return: The width, in pixels.
r)r@)r)rrrr<00>szBitmapImage.widthcCs
|jdS)zW
Get the height of the image.
:return: The height, in pixels.
r)r@)r)rrrrszBitmapImage.heightcCs
t|j<01>S)z<>
Get the Tkinter bitmap image identifier. This method is automatically
called by Tkinter whenever a BitmapImage object is passed to a Tkinter
method.
:return: A Tkinter bitmap image identifier (a string).
)r1rA)r)rrrr2 szBitmapImage.__str__)N) r<r=r>r?r+r0rrr2rrrrr <00>s  
r cCs4t<00>d|<00><02>|<00><03>f<02>}|j}|j<05>d||j<07>|S)z:Copies the contents of a PhotoImage to a PIL image memory.r ZPyImagingPhotoGet)rr rrr r'r.r )Zphotor r:rrr<00>getimagesrBcCsHGdd<02>dtj<01>}tjs td<03><01>t<00><04>}|r6|<03>|<01>|||<00><02><06>dS)z!Helper for the Image.show method.c@seZdZdd<02>ZdS)z_show.<locals>.UIcSsF|jdkrt|d|d<03>|_nt||d<04>|_tjj|||jddd<07>dS)NrZwhite)Z
foreground<EFBFBD>master)rCZblackr)r*<00>bgZbd)rr r*rr
<00>Labelr+)r)rCr rrrr+&s
z_show.<locals>.UI.__init__N)r<r=r>r+rrrr<00>UI%srFztkinter not initializedN)r
rEZ _default_root<6F>IOErrorZToplevel<65>title<6C>pack)r*rHrF<00>toprrr<00>_show"s
rK)<11>sys<79>iorr6r<00> version_info<66>majorr
<00>Tkinterrrr<00>objectrr rBrKrrrr<00><module>s   
 D