Function retroimg::resolve_output_resolution
source · pub fn resolve_output_resolution(
width: u32,
height: u32,
output_width: Option<u32>,
output_height: Option<u32>,
pixel_ratio: Option<Ratio<u32>>
) -> Result<(u32, u32), ResolutionError>
Expand description
Identify the intended output resolution based on a combination of the input resolution, the desired output dimensions, and/or the pixel ratio.
Only the following combinations of are valid:
output_width
andoutput_height
;pixel_ratio
andoutput_width
;pixel_ratio
andoutput_height
.