BlurParams structure (gdipluseffects.h)

A BlurParams structure contains members that specify the nature of a Gaussian blur.

You can apply a Gaussian blur effect to a bitmap by following these steps.

  1. Create and initialize a BlurParams structure.
  2. Pass the address of the BlurParams structure to the Blur::SetParameters method of a Blur object.
  3. Pass the address of the Blur object to the Graphics::DrawImage method or to the Bitmap::ApplyEffect method.

Syntax

struct BlurParams {
  float radius;
  BOOL  expandEdge;
};

Members

radius

Type: float

Real number that specifies the blur radius (the radius of the Gaussian convolution kernel) in pixels. The radius must be in the range 0 through 255. As the radius increases, the resulting bitmap becomes more blurry.

expandEdge

Type: BOOL

Boolean value that specifies whether the bitmap expands by an amount equal to the blur radius. If TRUE, the bitmap expands by an amount equal to the radius so that it can have soft edges. If FALSE, the bitmap remains the same size and the soft edges are clipped.

Remarks

One of the two Bitmap::ApplyEffect methods blurs a bitmap in place. That particular Bitmap::ApplyEffect method ignores the expandEdge parameter.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header gdipluseffects.h (include Gdiplus.h)