Table of Contents

Class VideoEffectInvert

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

Represents a color inversion effect that creates a photographic negative by inverting all RGB color values.

public class VideoEffectInvert : VideoEffect, IVideoEffectInvert, IVideoEffect

Inheritance

Implements

Inherited Members

Remarks

The invert effect transforms each pixel by subtracting its RGB components from 255, creating a color-negative image where black becomes white, white becomes black, and all colors are transformed to their complementary opposites.

This effect is useful for:

  • Creating artistic negative effects
  • Improving visibility of certain image content
  • Creating high-contrast effects for analysis
  • Achieving retro or artistic visual styles

The invert effect has no configurable parameters - it simply inverts all color values. For GPU-accelerated inversion with better performance, consider using VisioForge.Core.Types.VideoEffects.GPUVideoEffectInvert.

Constructors

VideoEffectInvert(bool, string, TimeSpan, TimeSpan)

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

public VideoEffectInvert(bool enabled, string name = "Invert", TimeSpan startTime = default, TimeSpan stopTime = default)

Parameters

enabled bool

true to enable the effect immediately; false to create the effect in a disabled state. The effect can be toggled on/off using the VisioForge.Core.Types.VideoEffects.VideoEffect.Enabled property.

name string

An optional name identifier for this effect instance. Default is "Invert". Used to retrieve specific effect instances from a collection.

startTime TimeSpan

The time at which the effect should start being applied. Default is Zero, which applies the effect from the beginning.

stopTime TimeSpan

The time at which the effect should stop being applied. Default is Zero, which applies the effect until the end.

Remarks

The invert effect has no adjustable parameters - it performs a complete color inversion. If both startTime and stopTime are zero (default), the effect will be applied for the entire video duration.

The inversion formula applied is: OutputColor = 255 - InputColor for each RGB channel.

Methods

GetEffectType()

Gets the specific type of this video effect.

public VideoEffectType GetEffectType()

Returns

VideoEffectType

Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.Invert to identify this as a color inversion effect.

Remarks

This method is used by the video processing pipeline to route the effect to the appropriate color inversion processor that applies the RGB value inversion.