Table of Contents

Enum ColorSpace

Namespace
Egami.Operations
Assembly
Egami.dll

The color space in which resizing, blurs and grayscale blend colors: the stored sRGB-encoded values, or linear light.

public enum ColorSpace

Fields

Encoded = 0

Blends the stored sRGB-encoded values, as most libraries and browsers do. The default: faster, and what most people expect.

Linear = 1

Converts to linear light, blends, and converts back. Physically correct: fine light detail on dark backgrounds keeps its brightness when reduced.

Examples

// Lanczos3 is sharper than the default Bicubic; Nearest keeps hard pixel edges (pixel art, masks).
using Raster sharp = photo.Derive(ops => ops.Resize(200, 0, ResampleFilter.Lanczos3), Ct);

// Blending in linear light keeps fine bright detail on dark backgrounds from going dim when reduced.
using Raster linear = photo.Derive(ops => ops.Resize(200, 0, ResampleFilter.Mitchell, ColorSpace.Linear), Ct);