Skip to main content

Rotate

The block rotates the image by a specified angle.

Block info

Name: RotateBlock.

Pin directionMedia typePins count
InputUncompressed video1
OutputUncompressed video1

The sample pipeline

Sample code

var pipeline = new MediaBlocksPipeline(false);

var filename = "test.mp4";
var fileSource = new UniversalSourceBlock(await UniversalSourceSettings.CreateAsync(new Uri(filename)));

var rotateBlock = new RotateBlock(0.7);
pipeline.Connect(fileSource.VideoOutput, rotateBlock.Input);

var videoRenderer = new VideoRendererBlock(pipeline, VideoView1);
pipeline.Connect(rotateBlock.Output, videoRenderer.Input);

await pipeline.StartAsync();

Platforms

Windows, macOS, Linux, iOS, Android.