pub extern "C" fn __wasm_bindgen_generated_resample(
    arg0: <PhotonImage as RefFromWasmAbi>::Abi,
    arg1: <usize as FromWasmAbi>::Abi,
    arg2: <usize as FromWasmAbi>::Abi
) -> <PhotonImage as ReturnWasmAbi>::Abi
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);