stitch_gif_animation#

data_morph.plotting.animation.stitch_gif_animation(output_dir: str | Path, start_shape: str, target_shape: str | Shape, keep_frames: bool = False, forward_only_animation: bool = False) None[source]#

Stitch frames together into a GIF animation.

Parameters:
  • output_dir (str or pathlib.Path) – The output directory to save the animation to. Note that the frames to stitch together must be in here as well.

  • start_shape (str) – The starting shape.

  • target_shape (str or Shape) – The target shape for the morphing.

  • keep_frames (bool, default False) – Whether to keep the individual frames after creating the animation.

  • forward_only_animation (bool, default False) – Whether to only play the animation in the forward direction rather than animating in both forward and reverse.

See also

PIL.Image

Frames are stitched together with Pillow.