SharpenParams structure (gdipluseffects.h)

The SharpenParams structure contains members that specify the nature of a sharpening adjustment to a bitmap.

You can adjust the sharpness of a bitmap by following these steps.

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

Syntax

struct SharpenParams {
  float radius;
  float amount;
};

Members

radius

Type: REAL

Real number that specifies the sharpening radius (the radius of the convolution kernel) in pixels. The radius must be in the range 0 through 255. As the radius increases, more surrounding pixels are involved in calculating the new value of a given pixel.

amount

Type: REAL

Real number in the range 0 through 100 that specifies the amount of sharpening to be applied. A value of 0 specifies no sharpening. As the value of amount increases, the sharpness increases.

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)