Class GrayscaleVideoEffect
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a cross-platform grayscale (black and white) video effect that converts color video to monochrome.
public sealed class GrayscaleVideoEffect : BaseVideoEffect, IBaseVideoEffect, IVideoEditXVideoEffectInheritance
Implements
Inherited Members
Remarks
SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, VideoEditCoreX, Media Blocks SDK (Cross-platform)
Platforms: Windows, Linux, macOS, Android, iOS
This effect converts color video to grayscale using perceptual luminance weights, producing a black and white image that accurately represents brightness values. The conversion preserves image detail and contrast while removing all color information.
The effect can be applied for artistic purposes, to simulate black and white film, or to reduce bandwidth requirements by removing color data.
Performance: Lightweight effect suitable for real-time processing on all platforms.
See Also: For Windows-only applications, see VideoEffectGrayscale
and GPUVideoEffectGrayscale for Classic SDK implementations.
Constructors
GrayscaleVideoEffect(string)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.GrayscaleVideoEffect class.
public GrayscaleVideoEffect(string name = "grayscale")Parameters
namestring-
The unique name identifier for this effect instance. Use this name to reference the effect when updating or removing it. Default value is "grayscale".
Fields
DefaultName
The default name for the grayscale effect.
public static string DefaultNameField Value
Properties
StartTime
Gets or sets the time when the effect should start being applied.
public TimeSpan StartTime { get; set; }Property Value
Remarks
Use VisioForge.Core.Types.X.VideoEffects.GrayscaleVideoEffect.StartTime and VisioForge.Core.Types.X.VideoEffects.GrayscaleVideoEffect.StopTime together to apply the effect only during a specific time range in the video.
StopTime
Gets or sets the time when the effect should stop being applied.
public TimeSpan StopTime { get; set; }Property Value
Remarks
Use VisioForge.Core.Types.X.VideoEffects.GrayscaleVideoEffect.StartTime and VisioForge.Core.Types.X.VideoEffects.GrayscaleVideoEffect.StopTime together to apply the effect only during a specific time range in the video.
Methods
GenerateDescription()
Generates the description.
public string GenerateDescription()Returns
- string
-
A string containing the GStreamer element description for the grayscale effect.