#
Image overlay
The block overlays an image loaded from a file onto a video stream.
You can set an image position and optional alpha value. 32-bit images with alpha-channel are supported.
#
Block info
Name: ImageOverlayBlock.
#
The sample pipeline
graph LR; UniversalSourceBlock-->ImageOverlayBlock; ImageOverlayBlock-->VideoRendererBlock;
#
Sample code
var pipeline = new MediaBlocksPipeline();
var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));
var imageOverlay = new ImageOverlayBlock(@"logo.png");
pipeline.Connect(fileSource.VideoOutput, imageOverlay.Input);
var videoRenderer = new VideoRendererBlock(pipeline, VideoView1);
pipeline.Connect(imageOverlay.Output, videoRenderer.Input);
await pipeline.StartAsync();
#
Platforms
Windows, macOS, Linux, iOS, Android.