Table of Contents

Class VideoEffectSaturation

Namespace
VisioForge.Core.Types.VideoEffects
Assembly
VisioForge.Core.dll

Represents a saturation adjustment effect that keeps the original colors or blends them toward gray.

public class VideoEffectSaturation : VideoEffect, IVideoEffectSaturation, IVideoEffect

Inheritance

Implements

Inherited Members

Remarks

Saturation controls how much color each pixel keeps: 255 leaves the original colors intact, lower values blend toward gray, and 0 produces a completely monochrome image. The effect cannot increase saturation beyond the source colors.

A value of 255 represents full saturation (original colors); values below reduce color intensity. Values above 255 are outside the supported range.

This effect supports animated saturation changes through the VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.ValueStop property, enabling smooth transitions from grayscale to full color.

Common applications:

  • Flattening over-saturated footage
  • Desaturation for muted, cinematic effects
  • Gradual transitions to grayscale
  • Vintage, pastel and washed-out looks
  • Color grading and mood adjustment

For GPU-accelerated saturation adjustment with better performance, consider using VisioForge.Core.Types.VideoEffects.GPUVideoEffectSaturation.

Constructors

VideoEffectSaturation(int, int, string, TimeSpan, TimeSpan, bool)

Initializes a new instance of the VisioForge.Core.Types.VideoEffects.VideoEffectSaturation class with specified parameters.

public VideoEffectSaturation(int value, int valueStop = 0, string name = "Saturation", TimeSpan startTime = default, TimeSpan stopTime = default, bool enabled = true)

Parameters

value int

The initial saturation value (0-255). 255 keeps the original colors; values below reduce color intensity, with 0 producing grayscale.

valueStop int

The ending saturation value for animated transitions (0-255). Default is 0 (no animation). When non-zero and different from value, creates a smooth transition.

name string

An optional name identifier for this effect instance. Default is "Saturation".

startTime TimeSpan

The time at which the effect should start being applied. Default is zero (from beginning).

stopTime TimeSpan

The time at which the effect should stop being applied. Default is zero (until end). Required when using valueStop to define the animation duration.

enabled bool

true to enable the effect immediately (default); false to create the effect in a disabled state.

Remarks

For static saturation adjustment, only set the value parameter. For animated saturation changes, set both value and valueStop along with appropriate time values.

Properties

Value

Gets or sets the saturation adjustment value.

public int Value { get; set; }

Property Value

int

Remarks

The saturation value controls color intensity:

  • 0: No saturation (grayscale/black-and-white)
  • 1-127: Reduced saturation (muted, desaturated colors)
  • 128: Half saturation (noticeably desaturated)
  • 200-254: Slightly reduced saturation
  • 255: Full saturation (original colors, default)

When combined with VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.ValueStop, the saturation will smoothly animate from this value to the stop value over the effect's time range.

ValueStop

Gets or sets the ending saturation value for animated saturation transitions.

public int ValueStop { get; set; }

Property Value

int

Remarks

When VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.ValueStop is set to a non-zero value different from VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.Value, the saturation will smoothly transition from VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.Value to this value over the time period defined by VisioForge.Core.Types.VideoEffects.VideoEffect.StartTime and VisioForge.Core.Types.VideoEffects.VideoEffect.StopTime.

If set to 0 (default), the saturation remains constant at VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.Value throughout the effect.

Common animated effects:

  • Color restoration: Value=0, ValueStop=255
  • Gradual desaturation: Value=255, ValueStop=200 (subtle desaturation)

Because 0 means "no animation", a transition that ends at grayscale cannot be expressed by a single effect instance; animate to a small non-zero value instead, or set VisioForge.Core.Types.VideoEffects.VideoEffectSaturation.Value to 0 for a static grayscale image.

Methods

GetEffectType()

Gets the specific type of this video effect.

public VideoEffectType GetEffectType()

Returns

VideoEffectType

Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.Saturation to identify this as a saturation adjustment effect.

Remarks

This method is used by the video processing pipeline to route the effect to the appropriate saturation adjustment processor.