imageio.plugins.swf#

Read/Write SWF files.

Backend: internal

Shockwave flash (SWF) is a media format designed for rich and interactive animations. This plugin makes use of this format to store a series of images in a lossless format with good compression (zlib). The resulting images can be shown as an animation using a flash player (such as the browser).

SWF stores images in RGBA format. RGB or grayscale images are automatically converted. SWF does not support meta data.

Parameters for reading#

loopbool

If True, the video will rewind as soon as a frame is requested beyond the last frame. Otherwise, IndexError is raised. Default False.

Parameters for saving#

fpsint

The speed to play the animation. Default 12.

loopbool

If True, add a tag to the end of the file to play again from the first frame. Most flash players will then play the movie in a loop. Note that the imageio SWF Reader does not check this tag. Default True.

htmlbool

If the output is a file on the file system, write an html file (in HTML5) that shows the animation. Default False.

compressbool

Whether to compress the swf file. Default False. You probably don’t want to use this. This does not decrease the file size since the images are already compressed. It will result in slower read and write time. The only purpose of this feature is to create compressed SWF files, so that we can test the functionality to read them.