img_make_transparent: Make a greyscale image transparent

View source: R/img_make_transparent.R

img_make_transparentR Documentation

Make a greyscale image transparent

Description

Turn white into fully transparent and black into fully opaque in a greyscale image.

Usage

img_make_transparent(x)

Arguments

x

a greyscale image, of type imager::cimg()

Examples

x <- img_read(system.file("extdata", "blob.jpg", package="morphr"))
img_show(x)
img_show(img_make_transparent(x))

jiho/morphr documentation built on May 11, 2024, 9:32 p.m.