Skip to main content

Function: keyOutBackground()

keyOutBackground(image, options): RgbaImage

Defined in: src/generative/BackgroundKeyer.ts:56

Makes background-colored pixels transparent, turning a subject-on-a-plain- background image into a clean cutout. Operates on a copy; the input is not mutated.

Parameters​

image​

RgbaImage

The source RGBA image.

options​

BackgroundKeyOptions = {}

Keying options.

Returns​

RgbaImage

A new RgbaImage with background pixels set to alpha 0.