Sharpen effect

Sharpens the image.

The CLSID for this effect is CLSID_D2D1Sharpen.

Example image

example of effect output

Sample code

ComPtr<ID2D1Effect> sharpenEffect;
m_d2dContext->CreateEffect(CLSID_D2D1Sharpen, &sharpenEffect);
 
sharpenEffect->SetInput(0, bitmap);
sharpenEffect->SetValue(D2D1_SHARPEN_PROP_SHARPNESS, 1.0f);
sharpenEffect->SetValue(D2D1_SHARPEN_PROP_THRESHOLD, 0.5f);
 
m_d2dContext->BeginDraw();
m_d2dContext->DrawImage(hueToRgbEffect.Get());
m_d2dContext->EndDraw();


Effect properties

The properties for the sharpen effect are defined by the D2D1_SHARPEN_PROP enumeration.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps | Windows Store apps]
Minimum supported server Windows 10 [desktop apps | Windows Store apps]
Header d2d1effects_2.h
Library d2d1.lib, dxguid.lib