IDCompositionSaturationEffect::SetSaturation method

Sets the saturation of the image.

Syntax

HRESULT SetSaturation(
  IDCompositionAnimation *animation
);

Parameters

animation

Type: IDCompositionAnimation*

An animation that represents how the saturation of the image changes over time. This parameter must not be NULL. You can set the saturation to a value between 0 and 1. If you set it to 1 the output image is fully saturated. If you set it to 0 the output image is monochrome. The saturation value is unitless.

        The effect calculates a color matrix based on the saturation value (s in the equation here) using the following equation:
        
Matrix equation

Return Value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Target Platform Windows
Header dcomp.h
Library Dcomp.lib
DLL Dcomp.dll

See Also

IDCompositionSaturationEffect