Learn Before
Concept

Image Sequences (Pillow)

Pillow includes support for image sequences, otherwise known as animated formats, such as GIF. Animated formats can be opened using the usual open() function, which will automatically load the first frame of the animation. The seek() function allows for loading the other frames of the animation. The argument of seek() is the number of frames to skip ahead.

image = Image.open("animation.gif") image.seek(frame)

The tell() function returns the current frame number.

image = Image.open("animation.gif") image.tell()

0

1

Updated 2021-08-08

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science

Learn After