Enum ColorChannel
- Namespace
- Egami.Operations
- Assembly
- Egami.dll
One channel of a raster's working RGBA, or its luminance, for ExtractChannel(ColorChannel).
public enum ColorChannel
Fields
Alpha = 3Alpha; opaque on a raster without alpha.
Blue = 2Blue; a gray raster's gray value.
Green = 1Green; a gray raster's gray value.
Luminance = 4The Rec. 709 luminance of the stored values, 0.2126 R + 0.7152 G + 0.0722 B, as Grayscale computes it.
Red = 0Red; a gray raster's gray value.
Examples
// Pull channels out as gray rasters (Gray8 from 8-bit images), edit one, and build the image again.
using Raster red = photo.ExtractChannel(ColorChannel.Red);
using Raster green = photo.ExtractChannel(ColorChannel.Green);
using Raster blue = photo.ExtractChannel(ColorChannel.Blue);
blue.Apply(ops => ops.Blur(2), Ct);
using Raster<Rgba8> rebuilt = Raster.CombineChannels<Rgba8>(red, green, blue);