+
    UBi                        ^ RI Ht ^ RIt^ RIHt ^ RIHt ^RIHtH	t	 Rt
]
'       d   ^RIHt R R	 ltR
 R lt ! R R4      t ! R R4      tR R ltR# )    )annotationsN)BytesIO)Any)Image	ImageFileF)CapsuleTypec                    V ^8  d   QhRRRR/# )   kwzdict[str, Any]returnzImageFile.ImageFile | None )formats   "0/usr/lib/python3.14/site-packages/PIL/ImageTk.py__annotate__r   +   s      > .H     c                    R pRV 9   d   V P                  R4      pM!RV 9   d   \        V P                  R4      4      pV'       g   R # \        P                  ! V4      # )Nfiledata)popr   r   open)r   sources   & r   _get_image_from_kwr   +   sI    F|	2(::fr   c               (    V ^8  d   QhRRRRRRRR/# )	r
   commandstrphotozPhotoImage | tkinter.PhotoImageptrr   r   Noner   )r   s   "r   r   r   6   s,     + ++8+?J+	+r   c                   VP                   p VP                  W\        V4      4       R#   \        P                   dE    ^RIHp TP                  TP                  4       4       TP                  Y\        T4      4        R# i ; i)   )
_imagingtkN)	tkcallreprtkinterTclError r!   tkinit
interpaddr)r   r   r   r"   r!   s   &&&  r   _pyimagingtkcallr*   6   sd     
B+
S	* + 	!"--/*
S	*+s   + ABBc                  f    ] tR t^ItRtRR R lltR R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )
PhotoImagea  
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               (    V ^8  d   QhRRRRRRRR/# )	r
   imagezImage.Image | str | Nonesizeztuple[int, int] | Noner   r   r   r   r   )r   s   "r   r   PhotoImage.__annotate__]   s2     ' ''' %' 	'
 
'r   c                	z   Vf   \        V4      pVf   Rp\        V4      h\        V\        4      '       d   TpR pVf   Rp\        V4      hMtVP                  pVR8X  dK   VP                  4        VP                  4        VP                  '       d   VP                  P                  MRpVP                  pVw  VR&   VR&   VR9  d   \        P                  ! V4      pWPn        W n        \        P                  ! R/ VB V n        V P                  P                   V n        V'       d   V P#                  V4       R # R # )	NImage is requiredz+If first argument is mode, size is requiredPRGBwidthheight)1Lr4   RGBAr   )r   
ValueError
isinstancer   modeapply_transparencyloadpaletter/   r   getmodebase_PhotoImage__mode_PhotoImage__sizer%   r,   _PhotoImage__photor"   paste)selfr.   r/   r   msgr<   s   &&&,  r   __init__PhotoImage.__init__]   s    =&r*E=%CS/!s##DE|C o% 
 ::Ds{((*

-2]]]u}}))::D(,%BwKH00$$T*D))/B/,,//JJu r   c                   V ^8  d   QhRR/# r
   r   r   r   )r   s   "r   r   r0           	 	 	r   c                	     V P                   P                  pR T P                   n         T P                   P                  P	                  RRT4       R #   \         d     R # i ; i  \
         d     R # i ; iNr.   delete)rC   nameAttributeErrorr"   r#   	ExceptionrE   rO   s   & r   __del__PhotoImage.__del__   j    	<<$$D !	LLOO  (D9	  		
  		"   A 'A% A"!A"%A43A4c                   V ^8  d   QhRR/# r
   r   r   r   )r   s   "r   r   r0           ! ! !r   c                ,    \        V P                  4      # )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).
)r   rC   rE   s   &r   __str__PhotoImage.__str__        4<<  r   c                   V ^8  d   QhRR/# r
   r   intr   )r   s   "r   r   r0            s r   c                (    V P                   ^ ,          # z=
Get the width of the image.

:return: The width, in pixels.
rB   r[   s   &r   r5   PhotoImage.width        {{1~r   c                   V ^8  d   QhRR/# r`   r   )r   s   "r   r   r0             r   c                (    V P                   ^,          # z?
Get the height of the image.

:return: The height, in pixels.
re   r[   s   &r   r6   PhotoImage.height   rg   r   c                    V ^8  d   QhRRRR/# )r
   imImage.Imager   r   r   )r   s   "r   r   r0      s     > > > >r   c                p   VP                  4       pVP                  pVP                  4       '       d   VP                  V P                  8w  dR   \
        P                  P                  V P                  VP                  4      pVP                  WC4       VP                  p\        RV P                  V4       R# )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.
PyImagingPhotoN)getimrn   isblockr<   rA   r   core	new_blockr/   convert2r   r*   rC   )rE   rn   r   r.   blocks   &&   r   rD   PhotoImage.paste   sv     hhj}}"''T[["8JJ((bgg>ENN5())C)4<<=r   )__mode__photo__sizer"   )NN)__name__
__module____qualname____firstlineno____doc__rG   rS   r\   r5   r6   rD   __static_attributes__r   r   r   r,   r,   I   s+    &'R	!> >r   r,   c                  Z    ] tR t^tRtRR R lltR R ltR R ltR	 R
 ltR R lt	Rt
R# )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
how to specify colours.

:param image: A PIL image.
Nc               $    V ^8  d   QhRRRRRR/# )r
   r.   zImage.Image | Noner   r   r   r   r   )r   s   "r   r   BitmapImage.__annotate__   s'     H H0 Hs Ht Hr   c                	    Vf   \        V4      pVf   Rp\        V4      hVP                  V n        VP                  V n        \        P                  ! RRVP                  4       /VB V n	        R # )Nr2   r   r   )
r   r:   r<   _BitmapImage__moder/   _BitmapImage__sizer%   r   tobitmap_BitmapImage__photo)rE   r.   r   rF   s   &&, r   rG   BitmapImage.__init__   s\    =&r*E=%CS/!jjjj**G0@GBGr   c                   V ^8  d   QhRR/# rJ   r   )r   s   "r   r   r      rK   r   c                	     V P                   P                  pR T P                   n         T P                   P                  P	                  RRT4       R #   \         d     R # i ; i  \
         d     R # i ; irM   )r   rO   rP   r"   r#   rQ   rR   s   & r   rS   BitmapImage.__del__   rU   rV   c                   V ^8  d   QhRR/# r`   r   )r   s   "r   r   r      rb   r   c                (    V P                   ^ ,          # rd   r   r[   s   &r   r5   BitmapImage.width   rg   r   c                   V ^8  d   QhRR/# r`   r   )r   s   "r   r   r      ri   r   c                (    V P                   ^,          # rk   r   r[   s   &r   r6   BitmapImage.height   rg   r   c                   V ^8  d   QhRR/# rX   r   )r   s   "r   r   r      rY   r   c                ,    \        V P                  4      # )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).
)r   r   r[   s   &r   r\   BitmapImage.__str__   r^   r   )ry   rz   r{   )N)r|   r}   r~   r   r   rG   rS   r5   r6   r\   r   r   r   r   r   r      s&    H	! !r   r   c                    V ^8  d   QhRRRR/# )r
   r   r,   r   ro   r   )r   s   "r   r   r     s      J ; r   c                    \         P                  ! RV P                  4       V P                  4       34      p\	        RWP                  4       4       V# )z:Copies the contents of a PhotoImage to a PIL image memory.r9   PyImagingPhotoGet)r   newr5   r6   r*   rr   )r   rn   s   & r   getimager     s9    	6EKKM5<<>:	;B(%<Ir   )
__future__r   r%   ior   typingr   r'   r   r   TYPE_CHECKING_typingr   r   r*   r,   r   r   r   r   r   <module>r      sH   6 #    $+&s> s>t>! >!Br   