border | R Documentation |
border
adds a border to an image.
border(
image,
top,
bottom = top,
left = top,
right = top,
border_type = "constant",
border_color = "black",
target = "new"
)
image |
An |
top , bottom , left , right |
The width in pixels of the border on each side
of the image. By default, |
border_type |
A character string indicating the extrapolation method to use when filling empty pixels created during the transformation. It can be any of the following:
|
border_color |
A value or vector of any kind of R color specification
compatible with |
target |
The location where the results should be stored. It can take 3 values:
|
If target="new"
, the function returns an Image
object. If target="self"
, the function returns nothing and modifies
image
in place. If target
is an Image
object,
the function returns nothing and modifies that Image
object in
place.
Simon Garnier, garnier@njit.edu
Image
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_border <- border(balloon, 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.