Make Musaic Format of Your Selfie

Lego format of my own selfie.

Ryan Timpe has done great job with his brickr package. Now living in the Denmark, the only think I knew about the Denmark was the LEGO toys :).

Now thanks to his Brickr package now you can build the Musiac of the your selfie. Fist, I found about this capability from Ryan tweet, here:

Now, I am going to make my own one :)

The first thing you need to do is load the package:

# If you have not installed the package
#install.packages('brickr')
library(brickr)

Then, next step is to read and upload your photo, I am planning to use this photo:

Download selfie.png

Ok, now you have the selfie.png at your directory, we need to read it through the png:

awseome_selfie <- png::readPNG("selfie.png")

Ok, now having that, the next step you must take is some pipe as the below:

awseome_selfie %>% 
  image_to_mosaic(img_size = 62) %>% 
  build_mosaic()