View source: R/remove_image_bg.R
remove_image_bg | R Documentation |
Import and image and remove the background using magick.
remove_image_bg(
path,
color = "white",
fuzz = 0,
save_path = file.path(tempdir(), "phylopic_processed", paste0(basename(dirname(path)),
".png"))
)
path |
a file, url, or raster object or bitmap array |
color |
a valid color string such as
|
fuzz |
relative color distance (value between 0 and 100) to be considered similar in the filling algorithm |
Named list containing the modified image itself and the saved path of the modified image.
path <- paste0("https://images.phylopic.org/images/",
"2de1c95c-7e1f-429b-9c08-17f0a27d176f/vector.svg")
img_res <- remove_image_bg(path=path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.