image_resized_size

Function image_resized_size 

Source
pub fn image_resized_size(
    size: (u32, u32),
    term_size: (u32, u32),
    preserve_aspect: bool,
) -> (u32, u32)
Expand description

Get the image size to downscale to, given its size, the terminal’s size and whether to preserve its aspect.

The resulting image size is twice as tall as the terminal size because we print two pixels per cell (height-wise).