https://pillow.readthedocs.io/en/stable/reference/ImageSequence.html
ImageSequence module - Pillow (PIL Fork) 12.2.0 documentation
The ImageSequence module contains a wrapper class that lets you iterate over the frames of an image sequence. Extracting frames from an animation: The Iterator...
imagesequence modulepillowforkdocumentation