Highlights and Shadows Effect
Adjusts the highlights and shadows of the image.
The CLSID for this effect is CLSID_D2D1HighlightsShadows.
Example Image

Sample Code
ComPtr<ID2D1Effect> highlightsAndShadowsEffect; m_d2dContext->CreateEffect(CLSID_D2D1HighlightsShadows, &highlightsAndShadowsEffect); highlightsAndShadowsEffect->SetInput(0, bitmap); highlightsAndShadowsEffect->SetValue(D2D1_HIGHLIGHTSANDSHADOWS_PROP_HIGHLIGHTS, 0.0f); highlightsAndShadowsEffect->SetValue(D2D1_HIGHLIGHTSANDSHADOWS_PROP_SHADOWS, 0.5f); highlightsAndShadowsEffect->SetValue(D2D1_HIGHLIGHTSANDSHADOWS_PROP_CLARITY, 0.2f); highlightsAndShadowsEffect->SetValue(D2D1_HIGHLIGHTSANDSHADOWS_PROP_INPUT_GAMMA, D2D1_HIGHLIGHTSANDSHADOWS_INPUT_GAMMA_LINEAR); highlightsAndShadowsEffect->SetValue(D2D1_HIGHLIGHTSANDSHADOWS_PROP_MASK_BLUR_RADIUS, 1.0f); m_d2dContext->BeginDraw(); m_d2dContext->DrawImage(hueToRgbEffect.Get()); m_d2dContext->EndDraw();
Effect Properties
The properties for the highlights and shadows effect are defined by the D2D1_HIGHLIGHTSANDSHADOWS_PROP enumeration.
Requirements
| 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 |
Related topics
Show: