Skip to content

Instantly share code, notes, and snippets.

@jeroen
Last active February 14, 2019 21:32
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jeroen/0fb0d445523f41a291f1c10a3b26b301 to your computer and use it in GitHub Desktop.
Save jeroen/0fb0d445523f41a291f1c10a3b26b301 to your computer and use it in GitHub Desktop.
Generate favicon with magick
library(magick)
library(magrittr)
# Convert to 'ico' format
image_read("https://www.r-project.org/logo/Rlogo.png") %>%
image_scale("32x32!") %>% # remove the "!" after 32x32 to scale proportionally
image_write("favicon.ico", format = "ico")
# Favicon can also be png/gif
image_read("https://www.r-project.org/logo/Rlogo.png") %>%
image_scale("32x32") %>%
image_write("favicon.ico", format = "png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment