Files
intellecton/venv/lib/python3.12/site-packages/PIL/__pycache__/ImageTk.cpython-312.pyc
T

83 lines
9.1 KiB
Plaintext
Raw Normal View History

Ë
ß¼jÄãó¤—ddlmZddlZddlmZddlmZddlmZm Z dZ
e
rddl m Z dd „Z
dd
„ZGd „d «ZGd
„d«Zdd„Zy)é)Ú annotationsN)ÚBytesIO)ÚAnyé)ÚImageÚ ImageFileF)Ú CapsuleTypecóž—d}d|vr|jd«}nd|vrt|jd««}|sytj|«S)NÚfileÚdata)ÚpoprrÚopen)ÚkwÚsources úN/home/antigravity/intellecton/venv/lib/python3.12/site-packages/PIL/ImageTk.pyÚ_get_image_from_kwr+sI€Ø
€FØ
��|Ø—‘˜“‰Ø �2‰Ü˜Ÿ™ ›Ó(ˆÙ ØÜ �:‰:�fÓ Ðócó
—|j} |j||t|««y#tj$rDddlm}|j|j««|j||t|««YywxYw)Nr)Ú
_imagingtk) ÚtkÚcallÚreprÚtkinterÚTclErrorÚrÚtkinitÚ
interpaddr)ÚcommandÚphotoÚptrrrs rÚ_pyimagingtkcallr!6sh€ð
�‰€Bð+Ø
�‰�˜¤ S£ Õ*øÜ × Ñ ò+õ !à×ј"Ÿ-™-›/Ô*Ø
�‰�˜¤ S£ Ö*ð
+úsŽ+«ABÂBcóT—eZdZdZ d d
d„Zd d„Zd d„Zd
d„Zd
d„Zdd„Z y)Ú
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).
Nc ó:—|€ t|«}|€
d}t|«‚t|t«r|}d}|€yd}t|«‚|j}|dk(rD|j «|j
«|jr|jjnd}|j}|\|d<|d<|dvrtj|«}||_ ||_ tjdi|¤Ž|_|jj |_|r|j#|«yy) NúImage is requiredz+If first argument is mode, size is requiredÚPÚRGBÚwidthÚheight)Ú1ÚLr'ÚRGBA©)rÚ
ValueErrorÚ
isinstanceÚstrÚmodeÚapply_transparencyÚloadÚpaletteÚsizerÚ getmodebaseÚ_PhotoImage__modeÚ_PhotoImage__sizerr#Ú_PhotoImage__photorÚpaste)ÚselfÚimager5rÚmsgr1s rÚ__init__zPhotoImage.__init__]s€ð ˆ=Ü& rÓ*ˆEà ˆ=Ø%ˆCܘS“/Ð !Ü
˜œsÔ
#؈D؈Eàˆ|ØC�Ü  “oÐ%ð—:‘:ˆDØ�sŠ{à×(Ñ(Ô*Ø—
‘
” Ø-2¯]ª]�u—}‘}×)Ò)À�Ø—:‘:ˆDØ(,Ñ %ˆBˆw‰K˜˜H™à Ð0Ñ 0Ü×$Ñ$ TÓ*ˆDàˆŒ ؈Œ Ü×)Ñ)Ñ/¨BÑ/ˆŒ Ø—,‘,—/‘/ˆŒÙ Ø �J‰J�uÕ ð rcóà— |jj}d|j_ |jjj dd|«y#t$rYywxYw#t
$rYywxYw©Nr<Údelete)r9ÚnameÚAttributeErrorrrÚ Exception©r;rBs rÚ__del__zPhotoImage.__del__†ój€ð Ø—<‘<×$Ñ$ˆDð!ˆ� ‰ Ôð Ø �L‰L�O‰O× Ñ  ¨(°DÕ 9øô ò Ù ð ûô
ò Ù ð úó"‚Aª'A!Á AÁAÁ! A-Á,A-có,—t|j«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).
)r0r9©r;s rÚ__str__zPhotoImage.__str__‘ó€ô�4—<‘<Ó Ð rcó —|jdS©zU
Get the width of the image.
:return: The width, in pixels.
r©r8rJs rr(zPhotoImage.width›ó€ð �{‰{˜1‰~Ðrcó —|jdS©zW
Get the height of the image.
:return: The height, in pixels.
rrOrJs rr)zPhotoImage.height£rPrcó`—|j«}|j}|j«r|j|jk7rRt
j j|j|j«}|j||«|j}td|j|«y)aF
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.
ÚPyImagingPhotoN)
ÚgetimÚimÚisblockr1r7rÚcoreÚ new_blockr5Úconvert2r r!r9)r;rVr r<Úblocks rr:zPhotoImage.paste«sv€ð�h‰h‹jˆØ—‘ˆØ�}‰}Œ "§'¡'¨T¯[©[Ò"8Ü—J‘J×(Ñ(¨¯©°b·g±gÓ>ˆEØ �N‰N˜5 %Ô (Ø—)‘)ˆCäÐ)¨4¯<©<¸Õ=r)NN)r<zImage.Image | str | Noner5ztuple[int, int] | NonerrÚreturnÚNone©r\r]©r\r0©r\Úint)rVú Image.Imager\r])
Ú__name__Ú
__module__Ú __qualname__Ú__doc__r>rFrKr(r)r:r-rrr#r#IsT„ñð*+/Ø'+ð'à'ð'ð%ð'ðð 'ð
ó 'óR ó!óóô>rr#có:—eZdZdZdd d„Zd
d„Zd d„Zd d„Zd d„Zy)
Ú BitmapImageaä
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