View source: R/compose_image.R
compose_image | R Documentation |
This function inputs an image file and allows for resizing, cropping, and text annotations
compose_image(
image,
filename = NULL,
path = NULL,
scale = 1,
crop_region = NULL,
text = NULL,
textcolor = "white",
boxcolor = NULL,
font = "Helvetica",
fontsize = 70,
rel_fontsize = NULL,
gravity = "southwest",
location = "+20+20",
border = FALSE
)
image |
The path to the image file to be modified |
filename |
The filename of the output image |
path |
The path to the output image |
scale |
The resizing proportion of the original image (0 to 1; default is 1 = original size) |
crop_region |
The region to be cropped (e.g. '100x150+100+100', (width x height +upper_x +upper_y)). |
text |
The text string to be added to the image |
textcolor |
The color of the text annotation (default is "white") |
boxcolor |
The color of the textbox (default is 'NULL') |
font |
The font of the text annotation (default is "Helvetica") |
fontsize |
The fontsize of the text annotation (default is 70) |
rel_fontsize |
Whether to adjust the fontsize relative to width (x) or height (y) |
gravity |
The anchor point of the added text (default is "southwest") |
location |
The location of the text relative to the anchor point |
border |
Set to 'TRUE' if you want a black border frame for the output image |
The filename of the image file that was created
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.