Using image_annotate of 'magick' interactively. location, degrees, size, weight, and kerning are parameters of image_annotate. See reference manual of 'magick' for detail.
interactive_annotate(
image,
text,
gravity = "northwest",
font = "",
style = "normal",
decoration = NULL,
color = NULL,
strokecolor = NULL,
boxcolor = NULL,
range_max_size = 1000,
range_max_weight = 850,
range_max_kerning = 300,
resolution = 0.1,
return_param = FALSE,
scale
)
a magick image object or a list of values of location, degrees, size, weight, and kerning
a magick image object
character vector of length equal to 'image' or length 1
string with gravity value from gravity_types.
string with font family such as "sans", "mono", "serif", "Times", "Helvetica", "Trebuchet", "Georgia", "Palatino" or "Comic Sans".
value of style_types for example "italic"
value of decoration_types for example "underline"
a valid color string such as "navyblue" or "#000080". Use "none" for transparency.
a color string adds a stroke (border around the text)
a color string for background color that annotation text is rendered on.
define maximum of size in slider. must be positive.
define maximum of weight in slider. must be positive.
define maximum of kerning in slider. must be positive.
resolution of slider
If return_param is TRUE, returns a list of values of location, degrees, size, weight, and kerning. If return_param is FALSE, returns a magick image object.
geometry to be passed to image_scale function of magick package. image is scaled just for preview and result image is not scaled if scale is given.
Shota Ochi
# \donttest{
if (interactive())
{
interactive_annotate(wizard, "hello")
}
# }
Run the code above in your browser using DataLab