Table of Contents

Namespace PaintDotNet.Direct2D1.Effects

Classes

AffineTransform2DEffect

The 2D affine transform effect applies a spatial transform to a image based on a 3x2 matrix using the Direct2D matrix transform and any of six interpolation modes. You can use this effect to rotate, scale, skew, or translate an image. Or, you can combine these operations. Affine transfers preserve parallel lines and the ratio of distances between any three points in an image.

For more information, see 2D affine transform effect

AffineTransform2DEffect.Props
AlphaMaskEffect

This effect applies an alpha mask to an image. It has two inputs, named Destination and Mask. Color values in the Destination image are multiplied by the alpha channel of the Mask image.

For more information, see Alpha mask effect

AlphaMaskEffect.Props
AlphaMaskEffect2

Similar to AlphaMaskEffect, but also supports Straight alpha via configuring the AlphaMode property.

This effect applies an alpha mask to an image. It has two inputs, named Destination and Mask. Color values in the Destination image are multiplied by the alpha channel of the Mask image.

AlphaMaskEffect2.Props
ArithmeticCompositeEffect

Use the arithmetic composite effect to combine 2 images using a weighted sum of pixels from the input images.

For more information, see Arithmetic composite effect

ArithmeticCompositeEffect.Props
AtlasEffect

You can use this effect to output a portion of an image but retain the region outside of the portion for use in subsequent operations. The atlas effect is useful if you want to load a large image made up of many smaller images, such as various frames of a sprite.

For more information, see Atlas effect

AtlasEffect.Props
BitmapSourceEffect

Use the bitmap source effect to generate an IDeviceImage from an IBitmapSource for use as an input in an effect graph. This effect performs scaling and rotation on the CPU. It can also optionally generate a system memory mipmap, which can be a performance optimization for actively scaling very large images at various reduced resolutions.

For more information, see Bitmap Source effect

BitmapSourceEffect.Props
BitmapSourceEffect2

Similar to BitmapSourceEffect, but has improved performance and reduced functionality.

This effect will stream the bitmap source to the GPU as needed; the bitmap is not cached.

This effect will copy the pixels from the bitmap source directly to GPU memory, and as such will only work with pixel formats that can be copied directly to the GPU. It will not perform premultiplication, pixel format conversion, or color space conversion, nor will it ensure that the alpha channel contains opaque values for pixel formats that do not support alpha (such as Bgr32). Mipmap chains are also not supported.

For most purposes, it is recommended to use CreateImageFromBitmap(IDeviceContext, IBitmapSource, BitmapImageOptions) which will perform format conversions from pixel formats that cannot be directly copied to the GPU (e.g. Bgr24, indexed formats, etc.), and will ensure pixel formats like Bgr32 have an opaque alpha chanel.

BitmapSourceEffect2.Props
BlendEffect

Use the blend effect to combine 2 images. This effect has 26 blend modes.

For more information, see Blend effect

BlendEffect.Props
BlendEffect2

Similar to BlendEffect, but with different blend modes. Includes the layer blend modes from Paint.NET that are not supported by BlendEffect, such as Xor. Does not include the blend modes that are supported by BlendEffect.

The classic "Normal" blend mode from Paint.NET is equivalent to SourceOver or CompositeSourceOver.

The inputs are converted to straight alpha if the AlphaMode property is set to Premultiplied. The blend mode is applied, then the result is clamped to the range [0, 1]. Lastly, the output is premultiplied if the AlphaMode property is set to Premultiplied.

For a convenient way to use any blend or composite mode, see MixEffect.

BlendEffect2.Props
BokehBlurEffect

Use the Bokeh blur effect to give an out-of-focus appearance to an image.

See Bokeh (Wikipedia) for more information.

BokehBlurEffect.Props
BokehBlurMapEffect

This effect simulates the ability to have a per-pixel value for the blur radius of a BokehBlurEffect. This is implemented as a linear interpolation across many copies of the image blurred at various radius levels.

BokehBlurMapEffect.Props
BorderEffect

Use the border effect to extend an image from the edges. You can use this effect to repeat the pixels from the edges of the image, wrap the pixels from the opposite end of the image, or mirror the pixels across the bitmap border to extend the bitmap region.

For more information, see Border effect

BorderEffect.Props
BorderEffect2

Similar to BorderEffect, but adds the Transparent edge mode. This can be used to extend an image's bounds to infinity while not affecting its appearance. Unlike BorderEffect, the edge mode cannot be set separately for X and Y directions.

BorderEffect2.Props
BrightnessEffect

Use the brightness effect to control the brightness of the image.

For more information, see Brightness effect

BrightnessEffect.Props
ChromaKeyEffect

Converts a given color plus or minus a tolerance to alpha. For example, chroma-key can remove the background of an image for a green-screen overlay effect.

For more information, see Chroma-key effect

ChromaKeyEffect.Props
ClampEffect

Clamps the pixel values of the input image to a valid range.

ClampEffect.Props
ColorManagementEffect

Use the color management effect to transform an image from one ICC (International Color Consortium) color profile to another. The effect transforms the image according to the ICC specification.

For more information, see Color management effect

ColorManagementEffect.Props
ColorMatrixEffect

Use the color matrix effect to alter the RGBA values of a bitmap.

You can use this effect to:

  • Remove a color channel from an image.
  • Reduce the color in an image.
  • Swap color channels.
  • Combine color channels.

Many built-in effects are specializations of color matrix that are optimized for the intended use of the effects. Examples include saturation, hue rotate, sepia, and temperature and tint.

For more information, see Color matrix effect.
ColorMatrixEffect.Props
CompositeEffect

Use the composite effect to combine 2 or more images. This effect has 13 different composite modes. The composite effect accepts 2 or more inputs. When you specify 2 images, destination is the first input (index 0) and the source is the second input (index 1). If you specify more than 2 inputs the images are composited starting with the first input and the second and so on.

This effect implements all of the modes using the blending unit of the graphics processing unit (GPU).

For more information, see Composite effect

CompositeEffect.Props
ContrastEffect

Increases or decreases the contrast of an image.

The contrast function modifies each color channel value using two piecewise quadratic polynomials that meet with slope continuity at the point (0.5, 0.5).

For more information, see Contrast effect

ContrastEffect.Props
ConvertAlphaEffect

This effect converts an input image from one alpha format to another. It uses the PremultiplyEffect or UnPremultiplyEffect depending on the value of the Mode property.

This effect may be more convenient than using PremultiplyEffect or UnPremultiplyEffect depending on the nature and configuration of the effect graph you are working with.

ConvertAlphaEffect.Props
ConvertGammaEffect

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.

ConvertGammaEffect.Props
ConvolveMatrixEffect

Use the convolve matrix effect to apply an arbitrary 2D kernel to an image. You can use this effect to blur, detect edges, emboss, or sharpen an image.

For more information, see Convolve matrix effect

ConvolveMatrixEffect.Props
CropEffect

Use the crop effect to output a specified region of an image.

For more information, see Crop effect

CropEffect.Props
CroppedFloodEffect

Combines FloodEffect2 and CropEffect to create a cropped solid color fill effect.

This effect also supports configuring the alpha mode for the color and the output.

CroppedFloodEffect.Props
CrossFadeEffect

This effect combines two images by adding weighted pixels from the input images.

It has two inputs, named Destination and Source.

The cross fade formula is:

Output = SourceWeight * Source + (1 - SourceWeight) * Destination


For more information, see Cross-fade effect.

Please note that Direct2D's Weight property is reversed from what is implemented here; put another way, the inputs have been renamed from Destination and Source to Source and Destination. This results in a more natural mapping for the SourceWeight property.

You can use the Direct2D meanings for the inputs and properties by creating the effect manually with IDeviceContext.CreateEffect(DeviceEffectIDs.CrossFade), and then using SetValue(CrossFadeProperty.Weight) to set the Weight property.
CrossFadeEffect.Props
CrossFadeMaskEffect

Similar to CrossFadeEffect, but uses a mask image to do a per-pixel cross-fade between two images.

A SourceMask alpha value of 0 will use the pixel from Destination, while a value of 1 will use the pixel from Source, and 0.5 will take the average.

CrossFadeMaskEffect.Props
CustomEffectImpl
CustomEffectImpl<TProperties>
CustomEffectProperties
CustomEffect<TProperties>

The base class for implementing a custom effect in Direct2D. The custom effects system in PaintDotNet.Direct2D1 handles many things automatically, such as just-in-time registration and auto-generation of the registration XML.

DeviceEffect
DeviceEffectProperties
DeviceEffect<TProperties>
DirectionalBlurEffect

The directional blur effect is similar to Gaussian blur, except you can skew the blur in a particular direction. You can use this effect to make an image look as if it is in motion or to emphasize an animated image.

For more information, see Directional blur effect

DirectionalBlurEffect.Props
DiscreteTransferEffect

Use the discrete transfer effect to map the color intensities of an image using a step transfer function created from a list of values you provide.

For more information, see Discrete transfer effect

DiscreteTransferEffect.Props
DisplacementMapEffect

Use the displacement map effect to displace the pixels of the input image by the intensity values of a second input image.

For more information, see Displacement map effect

DisplacementMapEffect.Props
DistantDiffuseEffect

Use the distant-diffuse lighting effect to create an image that appears to be a non-reflective surface with where the light source appears to be coming from a long distance (like the sun or overhead lights) and the light is scattered in all directions. This effect uses the alpha channel as a height map and lights the image with a distant light source.

The color of the output bitmap is a result of light color, light position, and the surface geometry of the image. The alpha channel output for each pixel with diffuse lighting is always 1.0.

For more information, see Distant-diffuse lighting effect

DistantDiffuseEffect.Props
DistantSpecularEffect

Use the distant-specular lighting effect to create an image that appears to be a reflective surface where the light source appears to be coming from a long distance (like the sun or overhead lights). This effect uses the alpha channel as a height map and lights the image with a distant light source. The color of the output bitmap is a result of light color, light position, and the surface geometry. The alpha channel output for each pixel with specular lighting is the maximum of the red, green, and blue channel outputs for that pixel.

For more information, see Distant-specular lighting effect

DistantSpecularEffect.Props
DpiCompensationEffect

Use the DPI compensation effect to automatically adjust an input bitmap to match the DPI of the context. This is useful for situations where a bitmap is created or loaded at a different DPI than the screen.

For more information, see DPI compensation effect

DpiCompensationEffect.Props
EdgeDetectionEffect

Filters out the content of an image, leaving lines at the edges of contrasting sections of the image.

For more information, see Edge-detection effect

EdgeDetectionEffect.Props
EffectPropertyAccessorExtensions
EffectsObjectRefExtensions
EmbossEffect

Creates a grayscale version of the image that appears as though it has been stamped into paper.

For more information, see Emboss effect

EmbossEffect.Props
EmptyEffect

An effect that produces no output.

EmptyEffect.Props
ExposureEffect

Increase or decreases the exposure of the image.

For more information, see Exposure effect

ExposureEffect.Props
FloodEffect

Use the flood effect to generate a bitmap based on the specified color and alpha value. You can use this effect when you want a specific color as an input for an effect, like a background color.

For more information, see Flood effect

FloodEffect.Props
FloodEffect2

Use this effect to generate an image based on the specified color and alpha value.

This effect is similar to FloodEffect, but uses a ColorRgba128Float instead of a Vector4Float for specifying the color, along with the alpha mode. This effect will automatically premultiply the color value unless the alpha mode is set to Straight.

FloodEffect2.Props
GammaTransferEffect

Use the gamma transfer effect to map the color intensities of an image using a gamma function created using an amplitude, exponent, and offset you provide for each channel.

For more information, see Gamma transfer effect

GammaTransferEffect.Props
GammaTransferEffect2

Similar to GammaTransferEffect, but allows specifying the alpha format of the input and output.

GammaTransferEffect2.Props
GaussianBlurEffect

Use the Gaussian blur effect to create a blur based on the Gaussian function over the entire input image.

You can use this effect to create glows and drop shadows and use the composite effect to apply the result to the original image. It is useful in photo processing for filters like highlights and shadows.

You can use the output of this effect for input into lighting effects, like the Specular Lighting or Diffuse Lighting effects, because the alpha channel is blurred too, and lighting effects use the alpha channel to determine surface geometry as a height map.

This effect is used by the built-in ShadowEffect.

For more information, see Gaussian blur effect

GaussianBlurEffect.Props
GaussianBlurEffect2

Provides the same functionality as GaussianBlurEffect, but adds a HighQuality mode that does not apply any optimizations or shortcuts that reduce image quality. When using the HighQuality mode, rendering quality is greatly improved for images that are gamma corrected or that have a low dynamic range (such as when using a large gamma exponent), but performance is greatly reduced.

NOTE: The maximum value for the StandardDeviation property is much lower than for GaussianBlurEffect.

GaussianBlurEffect2.Props
GaussianBlurMapEffect

This effect simulates the ability to have a per-pixel value for the blur radius (standard deviation) of a GaussianBlurEffect2. This is implemented as a linear interpolation across many copies of the image blurred at various radius levels.

GaussianBlurMapEffect.Props
GrayscaleEffect

Converts an image to monochromatic gray.

For more information, see Grayscale effect

GrayscaleEffect.Props
GrayscaleEffect2

Similar to GrayscaleEffect, but can also be configured for sRGB or linear gamma. This also necessitates the specification of straight vs. premultiplied alpha.

GrayscaleEffect2.Props
HighlightsAndShadowsEffect

Adjusts the highlights and shadows of the image.

For more information, see Highlights and shadows effect

HighlightsAndShadowsEffect.Props
HistogramEffect

Use the histogram effect to generate a histogram for the input bitmap based on the specified number of bins.

This effect does not produce an image output. Instead, its results are available through the HistogramOutput property after it has been drawn with DrawImage(IDeviceImage, Point2Float?, in RectFloat?, InterpolationMode, CompositeMode).

For more information, see Histogram effect

HistogramEffect.Props
HlslBinaryFunctionEffect

Executes an HLSL function that takes two parameters.

HlslBinaryFunctionEffect.Props
HlslBinaryOperatorEffect

Combines two images or values using an HSL binary operator such as +, -, *, or /.

HlslBinaryOperatorEffect.Props
HlslTernaryFunctionEffect

Executes an HLSL function that takes three parameters.

HlslTernaryFunctionEffect.Props
HlslUnaryFunctionEffect

Applies an HLSL unary operator to every pixel in the input image.

HlslUnaryFunctionEffect.Props
HlslUnaryOperatorEffect
HlslUnaryOperatorEffect.Props
HueRotationEffect

Use the hue rotate effect to alter the hue of an image by applying a color matrix based on the rotation angle.

For more information, see Hue rotatation effect

HueRotationEffect.Props
HueToRgbEffect

Converts an HSL (Hue, Saturation, Lightness) or HSV (Hue, Saturation, Value) image to the RGB color space. HSL and HSV are two different models for representing an RGB color in a cylindrical color space. They are useful because they allow you to reason about a color using more intuitive concepts like hue and intensity versus combining red, green and blue values.

This effect passes through any input alpha values.

To reverse the behavior of this effect, use RgbToHueEffect.

For more information, see Hue-to-RGB effect

HueToRgbEffect.Props
InputSelectorEffect

An effect with variable number of inputs, and a property to select which input is used as the output. This effect can be useful for changing an effect graph without having to rebuild it.

InputSelectorEffect.Props
InputSwizzleEffect

Swizzles the channels from a variable number of inputs. You can specify the input index and channel that corresponds to each output channel.

This effect supports any number of inputs, but only 4 can be used at once. Use InputCount to specify the number of inputs.

If you are only swizzling from 1 input, it is recommended to use the PixelSwizzleEffect instead.

output = new Color(
    Input[RedInputIndex][RedInputChannel],
    Input[GreenInputIndex][GreenInputChannel],
    Input[BlueInputIndex][BlueInputChannel],
    Input[AlphaInputIndex][AlphaInputChannel]);
InputSwizzleEffect.Props
InvertAlphaEffect

Inverts the alpha channel of an image.

InvertAlphaEffect.Props
InvertEffect

Inverts the colors of an image.

For more information, see Invert effect

InvertEffect.Props
InvertEffect2

Similar to InvertEffect, but does not require a premultiplied input. This means that color information can be preserved for transparent pixels when the input is in straight alpha format and AlphaMode is set to Straight.

InvertEffect2.Props
LinearToSrgbEffect

Converts an image from linear scRGB (gamma 1.0) to companded sRGB (gamma ~2.2).

LinearToSrgbEffect.Props
LinearTransferEffect

Use the linear transfer effect to map the color intensities of an image using a linear function created from a list of values you provide for each channel.

For more information, see Linear transfer effect

LinearTransferEffect.Props
LookupTable3DEffect

A 3D look-up table is a general-purpose effect that is used to encapsulate any 1:1 imaging effect by pre-computing how the effect maps inputs to outputs for a subset of all input values.

For more information, see 3D lookup table effect.

LookupTable3DEffect.Props
LuminanceToAlphaEffect

Use the luminance to alpha effect to set the alpha channel to the luminance of the image and sets the color channels to 0. You can use the output of this effect to make a semitransparent overlay based on the brightness of the input image. Or you can use it to make an image mask.
This effect sets the alpha channel of the output to the luminance of the input image using this color matrix:

                                 R'  G'  B'      A'
                              ┌                     ┐
                              │   0   0   0  0.2125 │  R
                              │   0   0   0  0.7154 │  G
[R' G' B' A'] = [R G B A 1] * │   0   0   0  0.0721 │  B
                              │   0   0   0       0 │  A
                              │   0   0   0       0 │  1
                              └                     ┘

This effect consumes and outputs premultiplied alpha images. The effect won't work on straight alpha images unless they are fully opaque.

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

NOTE: Because images are stored in a gamma-compensated format, before you calculate the luminance for an image you should first perform inverse gamma correction to get the true color values for the image. Since images are normally stored at 2.2 gamma, you can use GammaTransferEffect with an exponent of (1/2.2) and then use the output of that effect.

For more information, see Luminance to alpha effect
LuminanceToAlphaEffect.Props
MakeOpaqueEffect

Forces the input image to be opaque. This is useful when working with an image source that is in the BGR32 pixel format, as the "alpha" channel may be zero or uninitialized.

This effect is usually used with a BitmapSourceEffect2 as the input.

MakeOpaqueEffect.Props
MixEffect

Provides composite modes, blend modes, and alpha masking in the same effect.

This is the same as using the CompositeEffect, BlendEffect, BlendEffect2, or AlphaMaskEffect depending on which mode you want to use. This effect provides all of those modes in one effect which can be more convenient. It also performs automatic alpha-mode conversion when necessary and as specified by the AlphaMode property.

MixEffect.Props
MixModeExtensions
MixModeUtil
MorphologyEffect

Use the morphology effect to thin or thicken edge boundaries in an image. This effect creates a kernel that is 2 times the Width and Height values you specify. This effect centers the kernel on the pixel it is calculating and returns the maximum value in the kernel (if dilating) or minimum value in the kernel (if eroding).

For more information, see Morphology effect

MorphologyEffect.Props
OpacityEffect

This effect adjusts the opacity of an image by multiplying the alpha channel of the input by the specified opacity value.

For more information, see Opacity effect

OpacityEffect.Props
OpacityMetadataEffect

You can use this effect to mark an area of an input image as opaque, so internal rendering optimizations to the graph are possible.

NOTE: This effect doesn't modify the image itself to be opaque. It modifies data associated with the image so the renderer assumes the specified region is opaque. Use the MakeOpaqueEffect if you need the alpha channel to actually be opaque.

For more information, see Opacity metadata effect

OpacityMetadataEffect.Props
PassthroughEffect

This effect does not modify the input, serving instead as a passthrough node. This can be used to adjust caching, or simply as a way to wrap an IDeviceImage (such as an ICommandList or IDeviceBitmap) as an effect. This permits providing an IDeviceImage to another component, while retaining the ability to change the image without communicating with the other component (ICommandLists are immutable, and IDeviceBitmaps cannot be resized or have their pixel format changed).

PassthroughEffect.Props
PerspectiveTransform3DEffect

Use the 3D perspective transform effect to rotate the image in 3 dimensions as if viewed from a distance. The 3D perspective transform is more convenient than the 3D transform effect, but only exposes a subset of the functionality. You can compute a full 3D transformation matrix and apply a more arbitrary transform matrix to an image using the Transform3DEffect.

For more information, see 3D perspective transform effect

PerspectiveTransform3DEffect.Props
PixelSwizzleEffect

Swizzles the pixels of an input. This can be used to change the order of channels, or to to duplicate (broadcast) channels. For instance, to swap the red and green channels, set the Swizzle property to GRBA. As another example, to broadcast the green channel to all output channels, use GGGG.

You may use either RGBA or XYZW notation for channel names. Using RGBA is the same as XYZW.

PixelSwizzleEffect.Props
PixelSwizzleExtensions
PointDiffuseEffect

Use the point-diffuse lighting effect to create an image that appears to be a non-reflective surface with light scattered in all directions. This effect uses the alpha channel as a height map and lights the image with a point light source.

The color of the output bitmap is a result of light color, light position, and the surface geometry.

The alpha channel output for each pixel with diffuse lighting is always 1.0.

For more information, see Point-diffuse lighting effect

PointDiffuseEffect.Props
PointSpecularEffect

Use the point-specular lighting effect to create an image that appears to be a reflective surface. The effect uses the alpha channel of the image as a height map and a point light source that you position, and calculates the reflection and light according to the specular portion of the Phong lighting model.

The color of the output bitmap is a result of light color, light position, and the surface geometry.

The alpha channel output for each pixel with specular lighting is the maximum of the red, green, and blue channel outputs for that pixel.

For more information, see Point-specular lighting effect

PointSpecularEffect.Props
PosterizeEffect

The posterize effect reduces the number of unique colors in an image.

For more information, see Posterize effect

PosterizeEffect.Props
PosterizeEffect2

Similar to PosterizeEffect, but permits up to 256 value counts instead of 16, supports posterizing the alpha channel, and can work on both straight and premultiplied inputs.

PosterizeEffect2.Props
PrecisionEffect

Adjusts the precision of an image. Use the Precision property to modify an image's precision.

PrecisionEffect.Props
PremultiplyEffect

Use this effect to convert an image from unpremultiplied alpha to premultiplied alpha.

The effect replaces each input pixel P = { R, G, B, A } with P' = { R * A, G * A, B * A, A } in the output.

For more information, see Premultiply effect

PremultiplyEffect.Props
PremultiplyEffect2

This effect produces the same output as PremultiplyEffect, but also has a property to enable or disable premultiplication. This simplifies creating transform or effect graphs that may or may not need to use premultiplication depending on their own configuration.

PremultiplyEffect2.Props
RandomNoiseEffect

This effect generates random noise.

RandomNoiseEffect.Props
ReplaceChannelEffect

Replaces one channel of the input image with that of another image.

color = Input[x,y];
color[Channel] = ChannelSource[x,y][Channel];
return color;
ReplaceChannelEffect.Props
RgbToHueEffect

Converts an RGB image to either the HSL (Hue, Saturation, Lightness) or HSV (Hue, Saturation, Value) color spaces. HSL and HSV are two different models for representing an RGB color in a cylindrical color space. They are useful because they allow you to reason about a color using more intuitive concepts like hue and intensity versus combining red, green and blue values.

This effect normalizes the output data (hue, saturation value for HSV or hue, saturation, lightness for HSL) to the range [0, 1].

To reverse the behavior of this effect, use the HueToRgbEffect.

For more information, see RGB-to-hue effect

RgbToHueEffect.Props
SaturationEffect

Use this effect to alter the saturation of an image. The saturation effect is a specialization of the color matrix effect.

For more information, see Saturation effect

SaturationEffect.Props
ScaleEffect

Use this effect to scale an image up or down. The effect has six scaling modes: nearest neighbor, linear, cubic, multi-sample linear, anisotropic, and high quality cubic.

For more information, see Scale effect

ScaleEffect.Props
ScenePositionEffect

An effect whose output at each location is the scene position. This can be useful for sample map effects that take a sample map as input, and produce a sample map as an output. If this effect is plugged into the SampleMapRenderer as the SampleMap input, the output will be the same as the Input image.

The scene position enumerates center-of-pixel offsets, such as { x = 0.5, y = 0.5 }, instead of whole-integer offsets, such as { x = 0, y = 0 }. If you prefer to have whole-integer offsets, pass the output of this effect to an HlslUnaryFunctionEffect with the Function property set to Floor.

ScenePositionEffect.Props
SepiaEffect

Converts an image to sepia tones.

For more information, see Sepia effect

SepiaEffect.Props
SepiaEffect2

Similar to SepiaEffect, but matches Paint.NET's original Sepia effect.

SepiaEffect2.Props
ShadowEffect

Use the shadow effect to generate a shadow from the alpha channel of an image. The shadow is more opaque for higher alpha values and more transparent for lower alpha values. You can set the amount of blur and the color of the shadow.

For more information, see Shadow effect

ShadowEffect.Props
ShadowEffect2

Provides the same functionality as ShadowEffect, but adds a HighQuality mode that does not apply any optimizations that reduce image quality. When using the HighQuality mode, rendering quality is greatly improved for certain types of images, but performance is also greatly reduced.

NOTE: The maximum value for the BlurStandardDeviation property is much lower than for ShadowEffect.

ShadowEffect2.Props
SharpenEffect

Sharpens the image.

For more information, see Sharpen effect

SharpenEffect.Props
SpotDiffuseEffect

Use the spot-diffuse lighting effect to create an image that appears to be a non-reflective surface with where the light source is limited to a directed cone of light and the light is scattered in all directions.

This effect uses the alpha channel as a height map and lights the image with a spot light source.

The color of the output bitmap is a result of light color, light position, and the surface geometry.

The alpha channel output for each pixel with diffuse lighting is always 1.0.

For more information, see Spot-diffuse lighting effect

SpotDiffuseEffect.Props
SpotSpecularEffect

Use the spot-specular lighting effect to create an image that appears to be a reflective surface where the light source is limited to a directed cone of light. This effect uses the alpha channel as a height map and lights the image with a point light source.

The color of the output bitmap is a result of light color, light position, the direction of the cone and the surface geometry according to the specular portion of the Phong lighting model.

The alpha channel output for each pixel with specular lighting is the maximum of the red, green, and blue channel outputs for that pixel.

For more information, see Spot-specular lighting effect

SpotSpecularEffect.Props
SrgbToLinearEffect

Converts an image from companded sRGB (gamma ~2.2) to linear scRGB (gamma 1.0).

SrgbToLinearEffect.Props
StandardDeviation
StraightenEffect

Rotates and optionally scales an image.

For more information, see Straighten effect

StraightenEffect.Props
TableTransferEffect

Use the table transfer effect to map the color intensities of an image using a transfer function created from interpolating a list of values you provide.

For more information, see Table transfer effect

TableTransferEffect.Props
TemperatureAndTintEffect

Adjusts the temperature and tint of the input image.

For more information, see Temperature and tint effect.

TemperatureAndTintEffect.Props
TileEffect

Use the tile effect to repeat the specified region of the image.

This effect generates a logically infinite sized bitmap.

For more information, see Tile effect

TileEffect.Props
TintEffect

This effect tints the source image by multiplying the source image by the specified color. It has a single input.

For more information, see Tint effect.

TintEffect.Props
Transform3DEffect

Use the 3D transform effect to apply an arbitrary 4x4 transform matrix to an image.

This effect applies the matrix (M) you provide to the corner vertices of the source:

image([ x y z 1 ])

using this calculation:

[ xr yr zr 1 ] = [ x y z 1 ] * M

For more information, see 3D transform effect

Transform3DEffect.Props
TurbulenceEffect

Use the turbulence effect to generate a bitmap based on the Perlin noise function.

The turbulence effect has no input image.

For more information, see Turbulence effect

TurbulenceEffect.Props
UnPremultiplyEffect

Use this effect to convert an image from premultiplied alpha to unpremultiplied alpha.

The effect replaces each input pixel P = { R, G, B, A } with P' = { R/A, G/A, B/A, A } in the output.

For more information, see Unpremultiply effect

UnPremultiplyEffect.Props
UnPremultiplyEffect2

This effect produces the same output as UnPremultiplyEffect, but also has a property to enable or disable unpremultiplication. This simplifies creating transform or effect graphs that may or may not need to use unpremultiplication depending on their own configuration.

UnPremultiplyEffect2.Props
VignetteEffect

Fades the input image at the edges to a user-set color.

For more information, see Vignette effect

VignetteEffect.Props

Structs

CompositeEffectSourceInputListAccessor
EffectInputAccessor
EffectPropertyAccessor<T>
InputSelectorEffectInputListAccessor

Enums

AlphaMaskAlphaMode2
BitmapSourceOpacityMetadata

Specifies the opacity metadata for an IBitmapSource when using the BitmapSourceEffect2 effect.

BlendAlphaMode2
BlendMode2
BokehBlurAlphaMode
BokehBlurEdgeMode
BokehBlurMapAlphaMode
BokehBlurMapEdgeMode
BorderEdgeMode2
ClampAlphaMode
ConvertAlphaMode

Specifies the alpha mode for the ConvertAlphaEffect.

ConvertGammaAlphaMode
ConvertGammaMode
CroppedFloodAlphaMode
FloodAlphaMode2

Specifies the alpha mode for the FloodEffect2.

GammaTransferAlphaMode2
GaussianBlurAlphaMode2
GaussianBlurMapAlphaMode
GaussianBlurMapOptimization
GaussianBlurOptimization2
GrayscaleAlphaMode2
GrayscaleInputGamma2
HlslBinaryFunction
HlslBinaryOperator
HlslEffectParameter
HlslTernaryFunction
HlslUnaryFunction
HlslUnaryOperator
InputSwizzleAlphaMode
InvertAlphaAlphaMode
InvertAlphaMode2
LinearToSrgbAlphaMode
MixAlphaMode
MixMode

Provides composite modes, blend modes, and alpha masking. These modes are aggregated from CompositeMode, BlendMode, BlendMode2, and the AlphaMaskEffect.

PixelSwizzle
PixelSwizzleAlphaMode
PosterizeAlphaMode2
RandomNoiseAlphaMode
ReplaceChannelAlphaMode
ScenePositionFormat

Specifies the output format of the ScenePositionEffect.

SepiaAlphaMode2
SepiaInputGamma2
ShadowAlphaMode2
ShadowOptimization2
SrgbToLinearAlphaMode