magick icon indicating copy to clipboard operation
magick copied to clipboard

hex and ghcard?

Open dmi3kno opened this issue 6 years ago • 3 comments

Do you want hex and ghcard for the package? I imagined something like this might work?

library(magick)
library(bunny)

img <- image_read_svg("Projects/ImageMagick_logo.svg", width = 850, height = 850) 

image_canvas_hex(border_color = "#2a3c93", fill_color = "#fef4ef") %>% 
  image_composite(img, gravity = "center", offset = "+0-150", operator = "Over") %>% 
  image_annotate("magick", gravity = "center", location = "+0+400", 
                 size = 250, font = "Aller", weight = 400, color = "#aa1b22") %>% 
  image_composite(image_canvas_hexborder(border_color = "#202459", border_size = 7), 
                  gravity = "center", operator = "Atop") %>% 
  image_scale("480x480") %>% 
  image_write("Projects/magick_logo.png")

magick_logo

Or alternatively, this one (I think it conveys the idea very well):


img_gif <- image_read("https://raw.githubusercontent.com/ropensci/magick/master/man/figures/Rlogo-banana.gif") 

image_canvas_hex(border_color = "#2a3c93", fill_color = "white") %>% 
  image_scale("50%") %>% 
  image_composite(img_gif, gravity = "center", offset = "+0-80", operator = "Over") %>% 
  image_annotate("magick", gravity = "center", location = "+0+200", 
                 size = 100, font = "Aller", weight = 400, color = "#202459") %>% 
  image_composite(image_scale(image_canvas_hexborder(border_color = "#202459", border_size = 7), "50%"),
                  gravity = "center", operator = "Atop") %>% 
  image_scale("480x480") %>%
  image_animate() %>% 
  image_write("Projects/ani_magick_logo.gif")

ani_magick_logo

dmi3kno avatar Feb 01 '20 19:02 dmi3kno

Or maybe you would like to announce a contest for reproducible image that can become a package logo. That would be really fun! Lots of code to showcase package functionality!

dmi3kno avatar Feb 02 '20 10:02 dmi3kno

Yeah sounds good. I like the first one, but maybe the magician should be larger to make it work on print?

jeroen avatar Feb 02 '20 12:02 jeroen

Ok, Here's a shot at a fully reproducible logo using original wizard image and standard R [named] colors. https://gist.github.com/dmi3kno/da6323a063ea736572bfacb7be21b165

This contains a few useful concepts regarding editing SVG with xml2, color replacement using masks and morphology manipulation (for producing background). I think it can be pedagogically useful ;)

dmi3kno avatar Feb 03 '20 16:02 dmi3kno