Skip to contents

Convert a data uri to an image in the correct format and save it to a file.

Usage

base64_to_img(data_uri, slug)

Arguments

data_uri

charachter, base64 image string as returned by parse_search_results

slug

character, name of file to export image to. WITHOUT extension

Value

nothing, called for side effects

Examples

if (FALSE) { # \dontrun{
data_uri <- paste0(
    "data:image/png;base64,",
    base64enc::base64encode(system.file("logo.png", package = "webbotparseR"))
)
base64_to_img(data_uri, "logo")
} # }