pub fn calculate_ratio( area_width: u32, area_height: u32, image_width: u32, image_height: u32, ) -> u32