pub enum Scaling {
Uniform(u16),
MaxSize(u16, u16),
Stretch(u16, u16),
}Expand description
Options for upscaling the video.
Default for new Encoders: MaxSize(720, 720).
§Note
Gridvid does not currently do any resampling or image interpolation. If the grid dimensions do not evenly divide the target resolution, Gridvid will scale to the nearest resolution that does.
For example, using MaxSize(720, 720) with a 50x50 grid will result in a 700x700 video resolution.
Variants§
Uniform(u16)
Upscales the video by a constant factor. Gridlines are added after scaling.
e.g. Uniform(8) will make each grid element an 8x8 square.
MaxSize(u16, u16)
Scales the video to fit within an width x height frame, keeping the original aspect ratio.
e.g. MaxSize(1920, 1080) will ensure the video will not be larger than 1920x1080.
Stretch(u16, u16)
Stretches the video to fit within the specified width and height, ignoring the original aspect ratio.
e.g. Stretch(512, 512) will stretch the video as closely as possible to a 512x512 square.