logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
# add a mask
logo <- x3p_add_mask(logo)
mask <- t(logo$surface.matrix==median(logo$surface.matrix))
logo <- x3p_add_mask_layer(logo, mask, color = "red", annotation = "median")
x3p_extract(logo, "#cd7f32")
# x3p_image(logo, size=c(500,500), zoom = 1)
Run the code above in your browser using DataLab