load_animation Function

Defined in pyglet.image

load_animation(filename, file=None, decoder=None)

Load an animation from a file.

Currently, the only supported format is GIF.

Parameters:
  • filename (str) – Used to guess the animation format, and to load the file if file is unspecified.
  • file (file-like object or None) – File object containing the animation stream.
  • decoder (ImageDecoder or None) – If unspecified, all decoders that are registered for the filename extension are tried. If none succeed, the exception from the first decoder is raised.
Return type:

Animation

Previous topic

load Function

Next topic

pyglet.info