IDCompositionSaturationEffect::SetSaturation(IDCompositionAnimation*) method (dcomp.h)
Sets the saturation of the image.
Syntax
HRESULT SetSaturation(
[in] IDCompositionAnimation *animation
);
Parameters
[in] 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](images/saturation_formula.png)
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dcomp.h |
Library | Dcomp.lib |
DLL | Dcomp.dll |