dot-still_size: Fit source dimensions into a framing box

.still_sizeR Documentation

Fit source dimensions into a framing box

Description

Aspect-fits c(img_w, img_h) into the framing's pad box (either direction – upscale or downscale), rounded to the nearest even pixel as libx264 requires. With no framing, just even-rounds the source dimensions. This is what keeps zoompan from stretching a slide: the clip is rendered at the source's own aspect and letterboxed later.

Usage

.still_size(img_w, img_h, framing = NULL)

Arguments

img_w

Source width in pixels.

img_h

Source height in pixels.

framing

A framing list with a pad = c(w, h) element, or NULL.

Value

c(width, height), both even.


compost documentation built on Aug. 4, 2026, 5:11 p.m.