Description Usage Arguments Value Examples
Convert a 2D greyscale image to a 3D autostereogram. Set dot colors used in final image.
1 | image_to_magiceye(image, colors = c("#00436b", "#ffed89"), alpha_only = F)
|
image |
Matrix image, usually from |
colors |
Array of at least 2 color hex codes. Colors should be visually distinct and avoid using too many. |
alpha_only |
Logical. Set to TRUE to only consider alpha channel of a png when rendering image. |
A raster matrix for plot()
.
1 2 3 4 5 6 7 8 | # Import a jpeg or png
demo_file <- system.file("extdata", "demo_r.png",
package = "rstereogram", mustWork = TRUE)
demo_image <- png::readPNG(demo_file)
demo_image %>%
image_to_magiceye() %>%
plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.