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

Ë
ß¼ãó¤ddlmZddlZddlmZddlmZddlmZm Z dZ
e
rddl m Z dd „Z
dd
ZGd d «ZGd
d«ZddZy)é)Ú annotationsN)ÚBytesIO)ÚAnyé)ÚImageÚ ImageFileF)Ú CapsuleTypecóžd}d|vr|jd«}nd|vrt|jd««}|sytj|«S)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‰Ü˜Ÿ ÓÙ ØÜ :‰: Ðó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óTeZdZdZ d d
dZd dZd dZd
dZd
dZddZ 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ÚRGBÚwidthÚheight)Ú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ð ˆ& *ˆ ˆ%ˆ˜S“/Ð
˜œsÔ
ˆD؈Eàˆ|ØCÜ  “oЗ:‘:ˆDØsŠ{à×
Ø-2¯]ª]u—}‘}ר—:‘:ˆDØ(,Ñ %ˆBˆw‰K˜˜H™à Ð ×$ TÓ*ˆDàˆŒ ؈Œ Ü×/¨BÑŒ Ø—,‘,—/‘/ˆŒÙ Ø J‰J ð rcóà |jj}d|j_ |jjj dd|«y#t$rYywxYw#t
$rYywxYw©Nr<Údelete)r9ÚnameÚAttributeErrorrrÚ Exception©r;rBs rÚ__del__zPhotoImage.__del__†ójð Ø—<<×$ˆ!ˆ Ôð Ø L‰LO‰O× Ñ  ¨(°DÕ 9øô ò Ù ð ûô
ò Ù ð úó"Aª'A!Á AÁAÁ! A-Á,A-có,t|j«S)
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¯©°b·g±gÓ>ˆEØ N‰N˜5  —))ˆÐ)¨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 dZd
dZd dZd dZd dZy)
Ú 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