Enum EdgeMode
- Namespace
- Egami.Operations
- Assembly
- Egami.dll
How a convolution reads taps that fall past the image border.
public enum EdgeMode
Fields
Clamp = 0Repeats the edge pixel. The default.
Mirror = 1Reflects the image at its border, repeating the edge pixel:
c b a | a b c | c b a.Transparent = 3Reads fully transparent black, so edges fade out.
Wrap = 2Continues from the opposite edge, as if the image were tiled.
Examples
using Raster soft = photo.Derive(ops => ops.Blur(3), Ct); // Gaussian, sigma in pixels
using Raster boxed = photo.Derive(ops => ops.BoxBlur(4), Ct); // fast, radius in pixels
using Raster crisp = photo.Derive(ops => ops.Sharpen(0.8f, 1.5f), Ct); // unsharp mask: amount, sigma
// Any kernel: here a 3 × 3 emboss, with edges clamped and alpha left alone.
ConvolutionKernel emboss = new(3, 3, [-2, -1, 0, -1, 1, 1, 0, 1, 2]);
using Raster embossed = photo.Derive(ops => ops.Convolve(emboss, EdgeMode.Clamp, preserveAlpha: true), Ct);