Documentation
¶
Overview ¶
Package chromakey provides high-performance chroma key background removal and edge erosion for images.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Erode ¶ added in v1.0.1
Erode removes 1 pixel of alpha by clearing any opaque pixel that touches a fully transparent pixel.
func Remove ¶
Remove returns a new RGBA image where pixels whose RGB values are within the given threshold of keyColor are made fully transparent.
threshold is the squared Euclidean RGB distance (dr^2 + dg^2 + db^2).
func RemoveRange ¶ added in v1.0.2
func RemoveRange(img image.Image, keyColor color.Color, minThreshold, maxThreshold float64) image.Image
RemoveRange returns a new RGBA image applying a soft chroma key. Pixels within minThreshold of keyColor become fully transparent, and those beyond maxThreshold remain unchanged. Intermediate pixels will receive proportional transparency and color spill suppression.
thresholds are the squared Euclidean distance of BT.601 chroma components (dCb^2 + dCr^2).
Types ¶
This section is empty.