Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

draw_text

Draw text on an image


Description

Like other native CImg drawing functions, this is meant to be basic but fast. Use implot for flexible drawing.

Usage

draw_text(im, x, y, text, color, opacity = 1, fsize = 20)

Arguments

im

an image

x

x coord.

y

y coord.

text

text to draw (a string)

color

either a vector or a string (e.g. "red")

opacity

0: transparent 1: opaque.

fsize

font size (in pix., default 20)

Value

an image

Author(s)

Simon Barthelme

See Also

implot,draw_circle,draw_rect

Examples

draw_text(boats,100,100,"Some text",col="black") %>% plot

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.