Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
ImageSequence.cpython-313.pyc34 linesDownload Raw Back to __pycache__
1�

2v�j%	��h�SSKJr SSKJr Sr\(aSSKJr "SS5rS3SS	jjrg)�)�annotations�)�ImageF)�Callablec�@�\rSrSrSrS	SjrS4SjrSSjrSSjrSr	g)
�Iterator�a5This class implements an iterator object that can be used to loop6over an image sequence.7 8You can use the ``[]`` operator to access elements by index. This operator9will raise an :py:exc:`IndexError` if you try to access a nonexistent10frame.11 12:param im: An image object.13c��[US5(d
Sn[U5eXl[URSS5Ulg)N�seekzim must have seek method�14_min_framer)�hasattr�AttributeError�im�getattr�position)�selfr�msgs   �WD:\code\apps\devtools\python\user_packages\Python313\site-packages\PIL/ImageSequence.py�__init__�Iterator.__init__&s8���r�6�"�"�,�C� ��%�%��������q�9��
�c��URRU5 UR$![anSn[U5UeSnAff=f)N�end of sequence)rr�EOFError�15IndexError)r�ix�ers    r�__getitem__�Iterator.__getitem__-sA��	)��G�G�L�L����7�7�N���	)�#�C��S�/�q�(��	)�s�&)�16A�A�Ac��U$�N�)rs r�__iter__�Iterator.__iter__5s���rc���URRUR5 U=RS-
slUR$![anSn[	U5UeSnAff=f)Nrr)rrrr�
StopIteration)rrrs   r�__next__�Iterator.__next__8sT��	,��G�G�L�L����'��M�M�Q��M��7�7�N���	,�#�C���$�!�+��	,�s�AA�17A%�A � A%)rrN)r�Image.Image�return�None)r�intr*r))r*r)r*r))18�__name__�19__module__�__qualname__�__firstlineno__�__doc__rrr#r'�__static_attributes__r"rrrrs��	�:�)��,rrNc�8�[U[5(dU/n/nUHPnUR5nU[U5Vs/sHoUR	5PM sn-
nURU5 MR U(aUVs/sH20o"U5PM sn$U$s snfs snf)a21Applies a given function to all frames in an image or a list of images.22The frames are returned as a list of separate images.23 24:param im: An image, or a list of images.25:param func: The function to apply to all of the image frames.26:returns: A list of images.27)�28isinstance�list�tellr�copyr)r�func�ims�29imSequence�current�im_frames      r�30all_framesr=Bs����b�$����T��31�C��32��/�/�#�����0D�E�0D�H�
�
��0D�E�E������ ��(,�s�#�s��D��H�s�#�4��4��F��$s�B�<Br!)rzImage.Image | list[Image.Image]r8z+Callable[[Image.Image], Image.Image] | Noner*zlist[Image.Image])	�33__future__r�r�
TYPE_CHECKING�collections.abcrrr=r"rr�<module>rBsG��"#���
��(�%,�%,�T9=�5�'�5�345�5��5r
codekingpro/portable-devtools · Team Ai