Skip to main content

capture

Function capture 

Source
pub fn capture(screen: Screen, opts: &ShotOptions) -> Result<RgbaImage>
Expand description

Render screen offscreen and return the RGBA pixel buffer as an image.

ยงErrors

Returns an error if the headless renderer cannot be created (e.g. neither the GPU nor the tiny-skia backend is available) or if the produced pixel buffer does not match the requested physical dimensions.