View source: R/gemm_image_lines.R
gemm_image_lines | R Documentation |
This function is adopted directly from Georgios Karamanis' aRtist project at '<https://github.com/gkaramanis/aRtist/blob/main/portraits/portraits
gemm_image_lines( photo, filepath = tempfile(fileext = ".png"), line_color = "black", background_color = sample(colors(), 1), contrast = 4, density = 80, width = NA, height = NA )
photo |
The path to an image to visualize, read via [magick::image_read] |
filepath |
The path to save the output image to |
line_color |
The color to draw the lines of the image |
background_color |
The flat color to use as a background |
contrast |
Numeric value used to scale contrast (higher values create higher contrast images) |
density |
How many pixels to rescale the longest dimension to. Higher values create more "dense" lines |
width |
The width of the output ggplot |
height |
The height of the output ggplot |
filepath
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.