View source: R/image_modify_local.R
The function allows you to modify a subregion of your image (or, the opposite, keep the subregion unchanged while modifying other parts). You can set the four sides of the subregion or an irregular polygon by mouse click. If it is irregular, you MUST click in order.
1 2 3 4 5 6 7 8 9 | image_modify_local(
x,
FUN,
geometry = "click",
local = "local",
rectangle = TRUE,
trim = FALSE,
...
)
|
x |
an image read into R by
|
FUN |
the function used to
modify |
geometry |
this parameter is
different from the one used in package
magick. Here, in this function, you can
set |
local |
if it is 1 or "local", only a subregion of your image will be modified. If it is 2 or "other", keep the subregion unchanged while modifying other parts. If it is 3 or "subregion", the result is only the modified subregion, not the whole image. |
rectangle |
if it is TRUE (default), the subregion is a rectangle. If it is FALSE, the subregion can be an irregular polygon designated by your mouse click. |
trim |
whether to trim the subregion.
This is only used when |
..., |
extra parameters used by
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.