pub fn resample(
img: &PhotonImage,
dst_width: usize,
dst_height: usize
) -> PhotonImage
Expand description
Resample the PhotonImage.
Arguments
img
- A PhotonImage. See the PhotonImage struct for details.dst_width
- Target width.dst_height
- Target height.
Example
// For example, to resample a PhotonImage to 1920x1080 size:
use photon_rs::native::open_image;
use photon_rs::transform::resample;
let img = open_image("img.jpg").expect("File should open");
let rotated_img = resample(&img, 1920, 1080);