Table of Contents

Class GrayscaleEffect

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

Converts an image to monochromatic gray.

For more information, see Grayscale effect

public sealed class GrayscaleEffect : DeviceEffect<GrayscaleEffect.Props>, ISerializable, IDeviceEffect, IDeviceImage, IDirect2DResource, IFactoryProperty, IDeviceEffectProperties, IInternalImpl, IObjectRef, IIsDisposed, IDisposable
Inheritance
GrayscaleEffect
Implements
Inherited Members
Extension Methods

Remarks

NOTE: This effect works on sRGB (gamma 2.2) images. To correctly apply this effect to linear (gamma 1.0, aka "scRGB") images, use GrayscaleEffect2 instead and set the InputGamma property to Linear.

This effect calculates the luma for the image's color values, which is different than luminance which is calculated by the LuminanceToAlphaEffect. See Difference between Luma and Luminance for more information.

This effect works correctly with both premultiplied and straight alpha images.

Constructors

GrayscaleEffect(IDeviceEffectFactory)
GrayscaleEffect(IDeviceEffectFactory, IDeviceImage)