Enum MaskChannel
- Namespace
- Egami.Operations
- Assembly
- Egami.dll
Which values of a raster a Mask reads as coverage.
public enum MaskChannel
Fields
Alpha = 2The alpha: opaque is full coverage. A raster without alpha is opaque everywhere.
Auto = 0The value of a one-channel raster (gray, or Alpha8's alpha); otherwise the alpha of a raster with alpha; otherwise the luminance.
Blue = 5The blue channel; a gray raster's gray value.
Green = 4The green channel; a gray raster's gray value.
Luminance = 1The Rec. 709 luminance of the stored values: 0.2126 R + 0.7152 G + 0.0722 B. White is full coverage.
Red = 3The red channel; a gray raster's gray value.
Examples
// Edit only the sky: a gray mask, white where the edit applies fully, black where it does not, soft in between.
photo.Apply(ops => ops
.Within(new Mask(sky), o => o.Saturation(1.3f).Contrast(1.1f))
// Or take coverage from a logo's alpha, placed on the photo, and invert the area under it.
.Within(new Mask(logo, new Point(20, 20), MaskChannel.Alpha), o => o.Invert()), Ct);