Table of Contents

Class VideoEffectSolorize

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

Represents a solarization effect that inverts colors above or below a specified threshold, creating a distinctive high-contrast appearance reminiscent of overexposed photographic film.

public class VideoEffectSolorize : VideoEffect, IVideoEffectSolorize, IVideoEffect

Inheritance

Implements

Inherited Members

Remarks

The solarization (also spelled "solarize") effect is inspired by a photographic phenomenon where overexposure to light during film development causes partial or complete tone reversal. In digital video, this effect inverts pixel color values that exceed a specified threshold, creating dramatic, otherworldly imagery with distinctive tonal reversals. Areas below the threshold remain normal while areas above are inverted, producing sharp tonal transitions and surreal color combinations.

SDK Availability: VideoCaptureCore, MediaPlayerCore, VideoEditCore (Windows only)

Platform Support: Windows only

Technical characteristics:

  • Threshold-based color inversion creating tone reversal
  • Sharp contrast between normal and inverted regions
  • Creates psychedelic and surreal visual effects
  • Particularly dramatic with high-contrast source material
  • Lower threshold values affect more of the image

Common use cases include:

  • Psychedelic and experimental video art
  • Music video effects and creative content
  • Retro and vintage photographic effects
  • Science fiction and dystopian visual styles
  • Abstract and surreal artistic expression
  • Animated threshold transitions for dynamic effects

The solarization threshold can be animated by specifying different VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.Value and VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.ValueStop values. The effect will automatically interpolate between these thresholds, enabling smooth transitions where the solarization boundary sweeps across the tonal range. This can create dramatic animated effects as different brightness regions become solarized.

Performance: This is a CPU-based effect with minimal computational requirements. The threshold operation is very efficient, making this effect suitable for real-time processing even at high resolutions.

Constructors

VideoEffectSolorize(int, int, string, TimeSpan, TimeSpan, bool)

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

public VideoEffectSolorize(int value = 50, int valueStop = 0, string name = "solorize", TimeSpan startTime = default, TimeSpan stopTime = default, bool enabled = true)

Parameters

value int

The solarization threshold. Lower values cause more of the image to be solarized, creating more dramatic tone reversal effects. Higher values restrict solarization to bright areas only. Default is 50 (moderate solarization). Valid range is 1 to 255.

valueStop int

The ending solarization threshold for animated transitions. Set to 0 to disable animation and maintain constant threshold at value. When non-zero, the threshold will interpolate between value and this value over the effect's time range. Default is 0 (no animation). Valid range is 0 to 255.

name string

An optional name identifier for this effect instance. Default is "solorize". Used to retrieve specific effect instances from a collection via the name property. Multiple effects with the same type can coexist with different names.

startTime TimeSpan

The time at which the effect should start being applied. Default is Zero, which applies the effect from the beginning. Use a specific time value to delay the effect start.

stopTime TimeSpan

The time at which the effect should stop being applied. Default is Zero, which applies the effect until the end. Set to a specific time to limit the effect duration. When using animated transitions with valueStop, this defines the end point of the animation.

enabled bool

true to enable the effect immediately; false to create the effect in a disabled state. The effect can be enabled/disabled later using the VisioForge.Core.Types.VideoEffects.VideoEffect.Enabled property. Default is true.

Remarks

If both startTime and stopTime are zero (default), the effect will be applied for the entire video duration.

For best results, experiment with different threshold values based on your source material. High-contrast images with distinct bright and dark regions produce the most dramatic solarization effects.

Properties

Value

Gets or sets the solarization threshold (starting value for animations).

public int Value { get; set; }

Property Value

int

Remarks

Controls the brightness threshold at which color inversion occurs. Pixel values exceeding this threshold are inverted (negated), while values below remain unchanged. The threshold operates on pixel intensity, affecting how much of the image undergoes solarization.

Typical value ranges and their effects:

  • 1-30: Low threshold, most of image is solarized, only darkest areas normal
  • 31-70: Mid threshold, balanced mix of normal and solarized regions
  • 71-128: Higher threshold, only bright areas are solarized
  • 129-200: High threshold, only very bright highlights are solarized
  • 201-255: Very high threshold, minimal solarization effect

Lower threshold values cause more of the image to be solarized, creating more dramatic effects. Higher values restrict solarization to only the brightest regions, creating subtler, selective effects.

When VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.ValueStop is set to a different non-zero value, this property serves as the starting threshold for an animated transition.

ValueStop

Gets or sets the ending solarization threshold for animated transitions (optional).

public int ValueStop { get; set; }

Property Value

int

Remarks

When set to a non-zero value different from VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.Value, the solarization threshold will automatically interpolate between VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.Value and VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.ValueStop over the effect's duration (from VisioForge.Core.Types.VideoEffects.VideoEffect.StartTime to VisioForge.Core.Types.VideoEffects.VideoEffect.StopTime).

Animation examples:

  • Value=200, ValueStop=30: Gradually increase solarization (subtle to dramatic)
  • Value=30, ValueStop=200: Gradually decrease solarization (dramatic to subtle)
  • Value=128, ValueStop=30: Sweep solarization boundary from highlights to shadows
  • ValueStop=0: No animation, constant threshold at Value

Animated thresholds create dynamic effects where the solarization boundary moves across the tonal range, progressively revealing or concealing the solarization effect.

Set to 0 to disable animation and maintain constant solarization threshold at VisioForge.Core.Types.VideoEffects.VideoEffectSolorize.Value.

Methods

GetEffectType()

Gets the specific type of this video effect.

public VideoEffectType GetEffectType()

Returns

VideoEffectType

Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.Solorize to identify this as a solarization/tone reversal effect.

Remarks

This method overrides the base class implementation to provide the concrete effect type. The effect type is used by the video processing pipeline to route the effect to the appropriate solarization processing module.