+
     i  c                  sN    ^ RI Ht ^ RIHt ^RIHt  ! R R4      tR	R R lltR# )
i    )annotations)Callable)Imagec                  sJ    ] tR t^tRtR R ltR R ltR R ltR R	 ltR
t	R# )Iteratora  
This class implements an iterator object that can be used to loop
over an image sequence.

You can use the ``[]`` operator to access elements by index. This operator
will raise an :py:exc:`IndexError` if you try to access a nonexistent
frame.

:param im: An image object.
c                    V ^8  d   QhRRRR/# )   imImage.ImagereturnZNone Zformat   "8/usr/lib64/python3.14/site-packages/PIL/ImageSequence.py__annotate__Iterator.__annotate__$   s     : :; :4 :    c                	s    \        VR 4      '       g   Rp\        V4      hWn        \        V P                  R^ 4      V n        R# )seekzim must have seek methodZ
_min_frameN)ZhasattrZAttributeErrorr   Zgetattrposition)selfr   msgs   && r   __init__ZIterator.__init__$   s8    r6"",C %%q9r   c               r   )r   ixZintr   r   r	   r
   r   r   r   r   +   s     ) )c )k )r   c                	s     V P                   P                  V4       V P                   #   \         d   pR p\        T4      ThRp?ii ; i)end of sequenceN)r   r   EOFErrorZ
IndexError)r   r   er   s   &&  r   __getitem__ZIterator.__getitem__+   sA    	)GGLL77N 	)#CS/q(	)s   &) AAAc                   V ^8  d   QhRR/# )r   r   r   r	   r
   r   r   r   r   3   s      ( r   c                	s    V # Nr	   )r   s   &r   __iter__ZIterator.__iter__3   s    r   c               r   )r   r   r   r	   r
   r   r   r   r   6   s     , ,+ ,r   c                	s     V P                   P                  V P                  4       V ;P                  ^,          un        V P                   #   \         d   pRp\	        T4      ThRp?ii ; i)i   r   N)r   r   r   r   ZStopIteration)r   r   r   s   &  r   __next__ZIterator.__next__6   sT    	,GGLL'MMQM77N 	,#C$!+	,s   A	A A*A%%A*)r   r   N)
Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r   r   r   Z__static_attributes__r	   r   r   r   r      s     	:), ,r   r   Nc               s$    V ^8  d   QhRRRRRR/# )r   r   zImage.Image | list[Image.Image]funcz+Callable[[Image.Image], Image.Image] | Noner   zlist[Image.Image]r	   r
   r   r   r   r   @   s&     5 5'5
55 5r   c                s@   \        V \        4      '       g   V .p . pV  FS  pVP                  4       pT\        V4       Uu. uF  qUP	                  4       NK  	  up,          pVP                  V4       KU  	  V'       d   V U u. uF
  q! V 4      NK  	  up # T# u upi u up i )a  
Applies a given function to all frames in an image or a list of images.
The frames are returned as a list of separate images.

:param im: An image, or a list of images.
:param func: The function to apply to all of the image frames.
:returns: A list of images.
)Z
isinstanceZlistZtellr   Zcopyr   )r   r   ZimsZ
imSequenceZcurrentZim_frames   &&    r   
all_framesr   @   s     b$T
C
//#0DE0DH0DEE   (,s#sDHs#44 F $s   BBr   )Z
__future__r    Ztypingr   Z r   r   r   r	   r   r   <module>r       s%   " #  %, %,P5 5r   