Description Usage Arguments Author(s) Examples
Takes an image matrix from something like png::readPNG. Note that this cannot be saved out as jpeg as the lossy compression will drop the message
1 2 3 | lsb_encode(content, img, force_object = FALSE)
lsb_decode(img)
|
content |
Content to save into the image; can be a text string or an arbitrary R object. |
img |
An image matrix to save the message into |
force_object |
Logical: Force saving a scalar text string as an R object (will be slightly more space efficient). |
Rich FitzJohn
1 2 3 4 | img <- png::readPNG(system.file("img/Rlogo.png", package = "png"))
txt <- "hello from stegasaur"
img2 <- lsb_encode(txt, img)
lsb_decode(img2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.