Table of Contents

Class ConvertGammaEffect

Namespace
PaintDotNet.Direct2D1.Effects
Assembly
PaintDotNet.Windows.Framework.dll

This effect is used to convert the gamma of an input image. Conversion can be done from sRGB to Linear, Linear to sRGB, or a custom exponent can be used.

Conversion between sRGB and Linear uses the SrgbToLinearEffect or LinearToSrgbEffect, which implements a gamma exponent approximately equal to 2.2. See The sRGB Learning Curve for more information.

If a custom exponent is used, then GammaTransferEffect2 is used.

Images are usually encoded using sRGB, and most effects are implemented in the Linear gamma space. Therefore, it is more accurate to convert an image from sRGB to Linear before other effects are used for processing. The image should then be converted back from Linear to sRGB.

public sealed class ConvertGammaEffect : CustomEffect<ConvertGammaEffect.Props>, ISerializable, IDeviceEffect, IDeviceImage, IDirect2DResource, IFactoryProperty, IDeviceEffectProperties, IInternalImpl, IObjectRef, IIsDisposed, IDisposable
Inheritance
ConvertGammaEffect
Implements
Inherited Members

Constructors

ConvertGammaEffect(IDeviceEffectFactory)
ConvertGammaEffect(IDeviceEffectFactory, IDeviceImage, ConvertGammaMode, float, ConvertGammaAlphaMode)