Property WorkingSpaceLinear
- Namespace
- PaintDotNet.Effects.Gpu
- Assembly
- PaintDotNet.Effects.Core.dll
WorkingSpaceLinear
Gets a color context that matches the source image and which has been converted to use linear (1.0) gamma.
public static GpuEffectColorContext WorkingSpaceLinear { get; }
Property Value
Remarks
This is the recommended color context for most purposes. For more information on linear gamma, see
articles such as:
GPU Gems 3, Chapter 24: The Importance of Being Linear
Gamma error in picture scaling (Eric Brasseur)
This will use the source image's color profile and convert it to the linearized version of that color
profile. For example, sRGB will be converted to scRGB. If the color profile is already linearized, then
this is equivalent to WorkingSpace. If the color profile cannot be linearized, then
scRGB (linear sRGB) will be used.
Some Direct2D effects have an InputGamma property that defaults to sRGB. When using linear gamma you
should make sure to set that property to Linear.
If you need predefined color values (e.g. red, blue, etc.) use the LinearColors class.