add_vignette | R Documentation |
Takes an RGB array/filename and adds a camera vignette effect.
add_vignette(
image,
vignette = 0.5,
color = "#000000",
radius = 1.3,
filename = NULL,
preview = FALSE
)
image |
Image filename or 3-layer RGB array. |
vignette |
Default |
color |
Default |
radius |
Default |
filename |
Default |
preview |
Default |
3-layer RGB array of the processed image.
if(run_documentation()){
#Plot the dragon
plot_image(dragon)
}
if(run_documentation()){
#Add a vignette effect:
add_vignette(dragon, preview = TRUE, vignette = 0.5)
}
if(run_documentation()){
#Darken the vignette effect:
add_vignette(dragon, preview = TRUE, vignette = 1)
}
if(run_documentation()){
#Change the radius:
add_vignette(dragon, preview = TRUE, vignette = 1, radius=1.5)
add_vignette(dragon, preview = TRUE, vignette = 1, radius=0.5)
}
if(run_documentation()){
#Change the color:
add_vignette(dragon, preview = TRUE, vignette = 1, color="white")
}
if(run_documentation()){
#Increase the width of the blur by 50%:
add_vignette(dragon, preview = TRUE, vignette = c(1,1.5))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.