Interface ClearBorderOptions

interface ClearBorderOptions {
    allowCorners?: boolean;
    color?: "black" | "white";
    out?: Mask;
}

Properties

allowCorners?: boolean

Consider pixels connected by corners?

Default

false

color?: "black" | "white"

Clear either white or black area touching the border. In practice it will invert the color.

Default

'white'

out?: Mask

Image to which the resulting image has to be put.