image_encode_base64 {ollamar} | R Documentation |
Read image file and encode it to base64
image_encode_base64(image_path)
image_path |
The path to the image file. |
A base64 encoded string.
image_path <- file.path(system.file("extdata", package = "ollamar"), "image1.png")
substr(image_encode_base64(image_path), 1, 5) # truncate output