image_transparent_inverse: Keep Certain Colors Unchanged and Make Others Transparent

Description Usage Arguments

View source: R/image_transparent_inverse.R

Description

This function is an inverse version of magick::image_transparent. While the latter makes certain colors transparent, the former keeps them unchanged and make others transparent.

Usage

1
image_transparent_inverse(x, color, fuzz = 0)

Arguments

x

a magick image.

color

one or more colors you want want to keep unchanged.

fuzz

color tolerance between 0 and 100. Its length must be 1 or the same as color (which means you can have different fuzz values for different colors). Suppose your color is white. If fuzz=0, then only white will be kept unchanged; if fuzz=10, colors similar to white will also kept unchanged.


plothelper documentation built on July 2, 2020, 4:03 a.m.