resolutionEffect

fun resolutionEffect(width: Int, height: Int, scale: LayoutScale): Presentation

Creates a new Presentation instance.

The output frame will have the given width and height, given a Presentation.Layout. Width and height must be positive integers representing the output frame's width and height.

Parameters

width

The width of the output frame, in pixels.

height

The height of the output frame, in pixels.

scale

The LayoutScale to use when resizing the input frame to the output frame.


Creates a new Presentation instance.

The output frame will have the given height. Width will scale to preserve the input aspect ratio. For example, a 1920x1440 video can be scaled to 640x480 by passing a height of 480.

Parameters

height

The height of the output frame, in pixels


fun resolutionEffect(aspectRatio: Float, scale: LayoutScale): Presentation

Creates a new Presentation instance.

The output frame will have the given aspect ratio (width/height ratio). Width or height will be resized to conform to this aspectRatio, given a scale.

Parameters

aspectRatio

The aspect ratio (width/height ratio) of the output frame. Must be positive.

scale

The LayoutScale to use when resizing the input frame to the output frame.