vectorize image_annotate() on series of gifs

Is this what you were trying to achieve?

library(tidyverse)
library(magick)

images = 1:250 %>% 
  map(~image_annotate(falls_gif, paste0("Acre-Feet: ", 2*.x), 
                      size=20, color="white"))
images[[5]]

preview

Combining each annotated gif into a single gif (where I've reduced the number of frames in the original gif to reduce the file size):

images = 1:4 %>% 
  map(~image_annotate(falls_gif[seq(1,26,4)], paste0("Acre-Feet: ", 2*.x), 
                      size=20, color="white"))

x = image_join(images)
x

preview (4)

2 Likes