Built-in Effects

Direct2D effects provides this set of built-in effects. The effects come in several categories and are listed below.

Filter

Gaussian blur effect

Gaussian blur effect description and properties - CLSID_D2D1GaussianBlur

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

Before
The image before the effect.
After
The image after the transform.

 

Directional blur effect

Directional Blur effect description and properties - CLSID_D2D1DirectionalBlur

The directional blur effect is similar to Gaussian blur, except you can skew the blur in a particular direction.

Before
The image before the effect.
After
The image after the transform.

 

Convolve matrix effect

Convolve matrix effect description and properties - CLSID_D2D1ConvolveMatrix

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.

Before
The image before the effect.
After
The image after the transform.

 

Morphology effect

Morphology effect description and properties - CLSID_D2D1Morphology

Use the morphology effect to flatten or thicken edge boundaries in an image

Before
The image before the effect.
After
The image after the transform.

 

Composition

Composite effect

Composite effect description and properties - CLSID_D2D1Composite

Use the composite effect to combine 2 or more images. This effect has 13 different composite modes.

Before image 1
The first source image before the effect.
Before image 2
The second image before the effect.
After
The image after the transform.

 

Arithmetic composite effect

Arithmetic composite effect description and properties - CLSID_D2D1ArithmeticComposite

Use the arithmetic composite effect to combine 2 images using a special predefined formula.

Before image 1
The first source image before the effect.
Before image 2
The second image before the effect.
After
The image after the transform.

 

Blend effect

Blend effect description and properties - CLSID_D2D1Blend

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

Before image 1
The first source image before the effect.
Before image 2
The second image before the effect.
After
The image after the transform.

 

Transparency

Luminance to alpha effect

Luminance to alpha effect description and properties - CLSID_D2D1LuminanceToAlpha

Use the luminance to alpha effect to set the alpha channel to the luminance of the image and sets the color channels to 0.

Before
The image before the effect.
After
The image after the transform.

 

Photo

Histogram effect

Histogram effect description and properties - CLSID_D2D1Histogram

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

Before
The image before the effect.
Graph of the histogram output data
The image after the transform.

 

Brightness effect

Brightness effect description and properties - CLSID_D2D1Brightness

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

Before
The image before the effect.
After
The image after the transform.

 

Color

Discrete transfer effect

Discrete transfer effect description and properties - CLSID_D2D1DiscreteTransfer

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.

Before
The image before the effect.
After
The image after the transform.

 

Table transfer effect

Table transfer effect description and properties - CLSID_D2D1TableTransfer

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.

Before
The image before the effect.
After
The image after the transform.

 

Linear transfer effect

Linear transfer effect description and properties - CLSID_D2D1LinearTransfer

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

Before
The image before the effect.
After
The image after the transform.

 

Gamma transfer effect

Gamma transfer effect description and properties - CLSID_D2D1GammaTransfer

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.

Before
The image before the effect.
After
The image after the transform.

 

Color matrix effect

Color matrix effect description and properties - CLSID_D2D1ColorMatrix

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

Before
The image before the effect.
After
The image after the transform.

 

Saturation effect

Saturation effect description and properties - CLSID_D2D1Saturation

Use this effect to alter the saturation of an image.

Before
The image before the effect.
After
The image after the transform.

 

Hue rotation effect

Hue rotation effect description and properties - CLSID_D2D1HueRotation

Use the hue rotation effect to alter the hue of an image by rotating the RGBA values around a color matrix.

Before
The image before the effect.
After
The image after the transform.

 

Color management effect

Color management effect description and properties - CLSID_D2D1ColorManagement

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.

Premultiply effect

Premultiply effect description and properties - CLSID_D2D1Premultiply

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

Unpremultiply effect

Unpremultiply effect description and properties - CLSID_D2D1UnPremultiply

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

DPI compensation effect

DPI compensation effect description and properties - CLSID_D2D1DpiCompensation

Opacity metadata effect

Opacity metadata effect description and properties - CLSID_D2D1OpacityMetadata

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

Lighting and Stylizing

Point-specular effect

Point-specular effect description and properties - CLSID_D2D1PointSpecular

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.

Lighting effect before and after example image.

Spot-specular effect

Spot-specular effect description and properties - CLSID_D2D1SpotSpecular

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.

Lighting effect before and after example image.

Distant-specular effect

Distant-specular effect description and properties - CLSID_D2D1DistantSpecular

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.

Lighting effect before and after example image.

Point-diffuse effect

Point-diffuse effect description and properties - CLSID_D2D1PointDiffuse

Lighting effect before and after example image.

Spot-diffuse effect

Spot-diffuse effect description and properties - CLSID_D2D1SpotDiffuse

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

Lighting effect before and after example image.

Distant-diffuse effect

Distant-diffuse effect description and properties - CLSID_D2D1DistantDiffuse

Use the distant-diffuse lighting effect to create an image that appears to be a 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 reflecting in all directions. This effect uses the alpha channel as a height map and lights the image with a distant light source.

Lighting effect before and after example image.

Shadow effect

Shadow effect description and properties - CLSID_D2D1Shadow

Use the shadow effect to generate a shadow from the alpha channel of an image.

Before
The image before the effect.
After
The image after the transform.

 

Displacement map effect

Displacement map effect description and properties - CLSID_D2D1DisplacementMap

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

Displacement map effect before and after example image.

Source

Bitmap source effect

Bitmap source effect description and properties - CLSID_D2D1BitmapSource

Use the bitmap source effect to generate an ID2D1Image from a IWICBitmapSource for use as an input in an effect graph.

Flood effect

Flood effect description and properties - CLSID_D2D1Flood

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.

Flood effect example image.

Turbulence effect

Turbulence effect description and properties - CLSID_D2D1Turbulence

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

Turbulence effect example image.

Transform

Tile effect

Tile effect description and properties - CLSID_D2D1Tile

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

Tile effect before and after example image.

Crop effect

Crop effect description and properties - CLSID_D2D1Crop

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

Before
The image before the effect.
After
The image after the transform.

 

Border effect

Border effect description and properties - CLSID_D2D1Border

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.

Before
The image before the effect.
After
The image after the transform.

 

Scale effect

Scale effect description and properties - CLSID_D2D1Scale

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

Before
The image before the effect.
After
The image after the transform.

 

2D affine transform effect

2D affine transform effect description and properties - CLSID_D2D12DAffineTransform

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.

2D affine effect before and after example image.

3D perspective transform effect

3D perspective transform effect description and properties - CLSID_D2D13DPerspectiveTransform

Use the 3D perspective transform effect to rotate the image in 3 dimensions as if viewed from a distance.

Before
The image before the effect.
After
The image after the transform.

 

3D transform effect

3D transform effect description and properties - CLSID_D2D13DTransform

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

Before
The image before the transform.
After
The image after the transform.

 

Requirements

Minimum supported clientWindows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]
Minimum supported serverWindows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]
Headerd2d1effects.h
Libraryd2d1.lib, dxguid.lib

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft