encode: Encode data in an image

Description Usage Arguments Examples

View source: R/stegasaur.R

Description

Encode data in an image

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

richfitz/stegasaur documentation built on Feb. 12, 2021, 1:41 a.m.