Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 1.62 KB

sepia-effect.md

File metadata and controls

67 lines (41 loc) · 1.62 KB
title description ms.assetid ms.topic ms.date
Sepia effect
Converts an image to sepia tones.
fe321be9-6ade-bd0c-1c66-cc8042e5a5e1
article
05/31/2018

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

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

Related topics