Closed 1010shane closed 1 year ago
Thanks. It looks like there has been a change of behavior in the gifski
renderer that creates the gifs. It is probably trying to be smart and skipping duplicate frames and instead increasing the playing time for those frames.
A workaround is to adapt the animate()
calls to use the magick renderer which creates a_mgif
and b_mgif
directly without the need to use image_read
:
a_mgif <- animate(a, width = 240, height = 240, renderer = magick_renderer())
b_mgif <- animate(b, width = 240, height = 240, renderer = magick_renderer())
# a_mgif <- image_read(a_gif)
# b_mgif <- image_read(b_gif)
Hello, trying to run this simple tutorial on the gganimate page for combining multiple gifs. The repex they provided (shown below) fails with an
Error: subscript out of bounds
error in the finalfor
loop which is sequentially combining individual frames to create the final gif.When I check the length of a_mgif and b_mgif, I get the following:
It seems that
image_read()
is truncating the number of frames in the gifs (which should be 100). I have tried fixing this by manually setting the number of frames of the gif to 100 in theanimate()
function, and have tried thecoalesce = FALSE
argument withinimage_read()
to no avail. Any advice?