This function creates a base64 string of a PNG (e.g. png) directly into HTML via the data function.
png2base64(file, img.returnAsTag = FALSE, img.title = "image",
img.width = NULL)
(character
) Path to PNG image.
(boolean
) TRUE, img is returned as HTML img
-tag; FALSE,
raw image base64 content is returned.
(character
) Title of the HTML img
-tag.
(character
) With for HTML img
-tag.
See paramter img.returnAsTag
.
The input file is read and a base64 string encoded The returned file is the value of the
img
attribute src
.