async fn decode_to_scaled_texture( bytes: Vec<u8>, max_dim: i32, ) -> Result<Texture, String>
Asynchronously decode image bytes into a scaled texture.