png2base64: Converts a PNG File Into a Base64 String for Using IT as...

Description Usage Arguments Details Value Author(s)

View source: R/utils.R

Description

This function creates a base64 string of a PNG (e.g. png) directly into HTML via the data function.

Usage

1
2
png2base64(file, img.returnAsTag = FALSE, img.title = "image",
  img.width = NULL)

Arguments

file

(character) Path to PNG image.

img.returnAsTag

(boolean) TRUE, img is returned as HTML img-tag; FALSE, raw image base64 content is returned.

img.title

(character) Title of the HTML img-tag.

img.width

(character) With for HTML img-tag.

Details

The input file is read and a base64 string encoded The returned file is the value of the img attribute src.

Value

See paramter img.returnAsTag.

Author(s)

Matthias Pfeifer <matthias.pfeifer@roche.com>


RTest documentation built on Dec. 4, 2019, 5:07 p.m.