Effet sépia

convertit une image en tons sépia.

Le CLSID de cet effet est CLSID _ D2D1Sepia.

Exemple d’image

exemple de sortie d’effet

Exemple de 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();


Propriétés d’effet

Les propriétés de l’effet sépia sont définies par l’énumération d2d1 _ sépia _ prop .

Spécifications

Condition requise Valeur
Client minimal pris en charge Windows 10 [ applications de bureau | Windows applications du windows Store]
Serveur minimal pris en charge Windows 10 [ applications de bureau | Windows applications du windows Store]
En-tête d2d1effects _ 2. h
Bibliothèque d2d1. lib, dxguid. lib