Files
intellecton/venv/lib/python3.12/site-packages/PIL/__pycache__/ImageSequence.cpython-312.pyc
T

34 lines
3.3 KiB
Plaintext
Raw Normal View History

Ë
ß¼ãóZddlmZddlmZdZerddlmZGdd«Z d
d d „Zy) é)Ú annotationsé)ÚImageF)ÚCallablecó0eZdZdZddZddZd dZd
dZy) Ú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|jdd«|_y)seekzim must have seek methodÚ
_min_framer)ÚhasattrÚAttributeErrorÚimÚgetattrÚposition)ÚselfrÚmsgs úT/home/antigravity/intellecton/venv/lib/python3.12/site-packages/PIL/ImageSequence.pyÚ__init__zIterator.__init__&s7Ür˜,ˆCÜ  Ó ˆŒÜ §¡¨°qÓ
ócó |jj|«|jS#t$r}d}t|«|d}~wwxYw)end of sequence)rr
ÚEOFErrorÚ
IndexError)rÚixÚers rÚ __getitem__zIterator.__getitem__-sAð G‰GL‰L˜Ô Ø—7‘7ˆNøÜò#ˆCܘS“/  (ûð )ús&)© A²AÁAcó|S©)rs rÚ__iter__zIterator.__iter__5s؈ rcóÎ |jj|j«|xjdz
c_|jS#t$r}d}t |«|d}~wwxYw)Nrr)rr
rrÚ
StopIteration)rrrs rÚ__next__zIterator.__next__8sTð G‰GL‰L˜ŸÔ MŠM˜QÑ —7‘7ˆNøÜò#ˆCÜ Ó$¨!Ð +ûð ,úsAAÁ A$ÁAÁA$N)rú Image.ImageÚreturnÚNone)rÚintr%r$)r%r)r%r$)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rrr r#rrrrrsñ óô,rrNcót|t«s|g}g}|D]M}|j«}|t|«Dcgc]}|j «Œc}z
}|j |«ŒO|r|Dcgc]
}||«Œ c}S|Scc}wcc}w)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.
)Ú
isinstanceÚlistÚtellrÚcopyr
)rÚfuncÚimsÚ
imSequenceÚcurrentÚim_frames rÚ