View source: R/interactive_fill.R
interactive_fill | R Documentation |
Using image_fill of 'magick' interactively. point and fuzz are parameters of image_fill. See reference manual of 'magick' for detail.
interactive_fill(
image,
color,
refcolor = NULL,
resolution = 0.1,
return_param = FALSE,
scale
)
image |
a magick image object |
color |
a valid color string such as "navyblue" or "#000080". Use "none" for transparency. |
refcolor |
if set, fuzz color distance will be measured against this color, not the color of the starting point. Any color (within fuzz color distance of the given refcolor), connected to starting point will be replaced with the color. If the pixel at the starting point does not itself match the given refcolor (according to fuzz) then no action will be taken. |
resolution |
resolution of slider of fuzz |
return_param |
If return_param is TRUE, returns a list values of point and fuzz. If return_param is FALSE, returns a magick image object. |
scale |
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. |
a magick image object or a list of values of point and fuzz
Shota Ochi
if (interactive())
{
interactive_fill(wizard, "black")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.