img_write | R Documentation |
Write an image
img_write(x, file, quality = 0.9)
x |
an image, of type |
file |
path to the output file; the extension determines the format. |
quality |
image quality, for JPG output only. |
The path to the written file, invisibly (assign it to a variable to capture it).
path <- system.file("extdata", "blob.jpg", package="morphr")
x <- img_read(path)
out <- img_write(x, file=tempfile(fileext=".jpg"))
out
out <- img_write(x, file=tempfile(fileext=".png"))
out
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.