Encode data in an image

encode(content, file_in, file_out)

Arguments

content

Content to encode: any R object is OK (see lsb_encode).

file_in

Source filename

file_out

Destination filename (can be the same as the source filename for a destructive update)

Examples

# file included with the package: file_in <- system.file("man_with_cats.jpg", package = "stegasaur") # output a png in a temporary directory: file_out <- tempfile("kitten", fileext = ".png") # some random data to encode: x <- runif(10) stegasaur::encode(x, file_in, file_out) # extract the data: stegasaur::decode(file_out)
#> [1] 0.080750138 0.834333037 0.600760886 0.157208442 0.007399441 0.466393497 #> [7] 0.497777389 0.289767245 0.732881987 0.772521511