encodeStill

suspend fun PlatformImage.encodeStill(spec: StillSpec = StillSpec()): StillBytes(source)

Encodes this frame as a still image.

The frame stays open, so closing it is still the caller's job. A StillSpec.heightPx that differs from the frame's own height scales it on the way out, keeping the frame's aspect.

Return

The encoded bytes, or why they could not be produced.

Parameters

spec

What the encoded still should look like.