[][src]Function termimage::ops::image_resized_size

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

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).