Skip to content

Instantly share code, notes, and snippets.

@trinker
Forked from jeroen/favicon.R
Created September 22, 2016 14:49
Show Gist options
  • Save trinker/2b8410f82e1e86e220f4f526b0cce701 to your computer and use it in GitHub Desktop.
Save trinker/2b8410f82e1e86e220f4f526b0cce701 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