%PDF- %PDF-
| Direktori : /usr/lib/python3/dist-packages/PIL/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/PIL/__pycache__/ImageSequence.cpython-312.pyc |
�
��e� � �R � d dl mZ d dlmZ ddlmZ G d� d� Z d d
d�Zy)� )�annotations)�Callable� )�Imagec �0 � e Zd ZdZdd�Zdd�Zd d�Zd
d�Zy)�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 �| � t |d� s
d}t |� �|| _ t | j dd� | _ y )N�seekzim must have seek method�
_min_framer )�hasattr�AttributeError�im�getattr�position)�selfr �msgs �3/usr/lib/python3/dist-packages/PIL/ImageSequence.py�__init__zIterator.__init__$ s7 � ��r�6�"�,�C� ��%�%���������q�9��
� c � � | j j |� | j S # t $ r}d}t |� |�d }~ww xY w)N�end of sequence)r r
�EOFError�
IndexError)r �ix�er s r �__getitem__zIterator.__getitem__+ sA � � )��G�G�L�L����7�7�N��� )�#�C��S�/�q�(�� )�s �&) � A�A � Ac � � | S �N� )r s r �__iter__zIterator.__iter__3 s � ��r c �� � | j j | j � | xj dz
c_ | j S # t $ r}d}t |� |�d }~ww xY w)Nr r )r r
r r �
StopIteration)r r r s r �__next__zIterator.__next__6 sT � � ,��G�G�L�L����'��M�M�Q��M��7�7�N��� ,�#�C���$�!�+�� ,�s �AA � A$�A�A$N)r �Image.Image)r �int�returnr$ )r&