View source: R/CRcolor_to_transparent.R
CRcolor_to_transparent | R Documentation |
Takes image_list loaded with CRload_image
and sets color specified in color_list to transparent. Index argument specifies which image to use.
CRcolor_to_transparent(image_list, index, color_list, status = NULL)
image_list |
Image_list created with |
index |
Index of image in image_list. |
color_list |
Color_list with elements r, g, b (and possibly a) specifying color in image to set to transparent. |
status |
Optional list |
Images are first loaded with CRload_image
and can later be rendered to screen using CRdraw_image
. Note that eventual effects of transparent colors are affected by blend mode set via CRset_blend_mode
.
CRset_blend_mode(gs, "blend")
myimage <- CRload_image(list(), "C:/Users/me/picture_of_me.jpg")
CRcolor_to_transparent(myimage, 1, list(r = 255, g = 110, b = 40))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.