Table of Contents

Class VideoEffectSaturation

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

Represents a saturation adjustment effect that controls the intensity and vividness of colors in the video.

public class VideoEffectSaturation : VideoEffect, IVideoEffectSaturation, IVideoEffect

Inheritance

Implements

Inherited Members

Remarks

Saturation determines how intense or vivid colors appear. Increasing saturation makes colors more vibrant and punchy, while decreasing it moves colors toward grayscale. At zero saturation, the image becomes completely monochrome (equivalent to grayscale).

A value of 255 represents full saturation (original colors). Values above 255 would over-saturate (which may not be supported depending on implementation), values below reduce color intensity.

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

Common applications:

  • Creating vibrant, stylized looks
  • Desaturation for muted, cinematic effects
  • Gradual transitions to/from grayscale
  • Color grading and mood adjustment
  • Compensating for washed-out footage

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). Default is 255 (full saturation). Values below 255 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 drain: Value=255, ValueStop=0
  • Color restoration: Value=0, ValueStop=255
  • Gradual enhancement: Value=255, ValueStop=200 (subtle desaturation)

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.