Table of Contents

Enum ImageRedactionCover

Namespace
LMKit.Media.Image
Assembly
LM-Kit.NET.dll

What an ImageRedactionArea is painted with.

public enum ImageRedactionCover

Fields

Fill = 0

A solid fill in FillColor, always opaque. The default.

Pixelate = 1

Square blocks of uniform colour, about seven across the area's longest side (at least six pixels each): each block takes the mean colour of its pixels.

Blur = 2

A soft blur: the mean colours of a grid of about six cells across the area's shortest side, interpolated smoothly between cell centres, with a faint fixed grain so the result shows no banding. The output is reproducible.

Examples

using LMKit.Media.Image;
using LMKit.Graphics.Geometry;

var request = new ImageRedactionRequest();
request.Areas.Add(new ImageRedactionArea(
    0, Rectangle.FromSize(300, 80, 96, 128), ImageRedactionShape.Ellipse, ImageRedactionCover.Pixelate));

ImageRedactionResult result = ImageRedactor.RedactToBytes(File.ReadAllBytes("team.jpg"), request);

Remarks

Pixelate and Blur are computed ONLY from the mean colours of a coarse grid laid over the area, never from a pixel's own value, so nothing finer than a grid cell survives: two pictures that differ only by detail smaller than a cell give the same covered pixels. The covered content cannot be recovered from the output, whatever deblurring or super-resolution is applied to it.

Every cover is fully opaque: on an image with an alpha channel, the covered pixels are made opaque.

Share