Converts a stack of frames into an animated GIF for display, with each
frame's index and label overlaid as text. In an interactive session the
animation opens in the system viewer; in a knitr/Quarto document it is
embedded as an inline animated GIF. Wraps magick::image_animate.
a magick-image object containing the animated sequence.
Arguments
images
an object of class magick-image to modify
fps
playback speed in frames per second. Must be a positive integer
divisor of 100, because GIF delay is stored in hundredths of a second
(delay = 100 / fps). Valid values: 1, 2, 4, 5, 10, 20, 25, 50,
100. Defaults to 10.
loop
a non-negative integer giving the number of times the animation
loops. 0 (the default) means loop forever.
frames
integer vector of frame indices to duplicate. Defaults to
NULL, which duplicates all frames.
label
logical. Whether to overlay the frame index and label on each
frame. Defaults to TRUE.