Skip to content

Instantly share code, notes, and snippets.

@jsta
Created December 10, 2021 15:57
Show Gist options
  • Save jsta/459293ea9cb150c1056c0c2aa651a8fc to your computer and use it in GitHub Desktop.
Save jsta/459293ea9cb150c1056c0c2aa651a8fc to your computer and use it in GitHub Desktop.
Use rstats magick to convert a png series to gif
library(magick)
image_write_gif(image_join(lapply(list.files("path/to/folder", pattern = "png",
include.dirs = TRUE, full.names = TRUE), image_read)), "output.gif", delay = 4.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment