Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Sepia Effect

Converts an image to sepia tones.

The CLSID for this effect is CLSID_D2D1Sepia.

Example Image

Example of effect output

Sample Code


ComPtr<ID2D1Effect> sepiaEffect;
m_d2dContext->CreateEffect(CLSID_D2D1Sepia, &sepiaEffect);
 
sepiaEffect->SetInput(0, bitmap);
sepiaEffect->SetValue(D2D1_SEPIA_PROP_INTENSITY, 0.75f);
sepiaEffect->SetValue(D2D1_SEPIA_PROP_ALPHA_MODE, D2D1_ALPHA_MODE_PREMULTIPLIED);
 
m_d2dContext->BeginDraw();
m_d2dContext->DrawImage(sepiaEffect.Get());
m_d2dContext->EndDraw();




Effect Properties

The properties for the sepia effect are defined by the D2D1_SEPIA_PROP enumeration.

Requirements

Minimum supported clientWindows 10 [desktop apps | Windows Store apps]
Minimum supported serverWindows 10 [desktop apps | Windows Store apps]
Headerd2d1effects_2.h
Libraryd2d1.lib, dxguid.lib

 

Related topics

ID2D1Effect

 

 

Show:
© 2017 Microsoft