Function photon_rs::transform::__wasm_bindgen_generated_rotate
source · pub extern "C" fn __wasm_bindgen_generated_rotate(
arg0: <PhotonImage as RefFromWasmAbi>::Abi,
arg1: <i32 as FromWasmAbi>::Abi
) -> <PhotonImage as ReturnWasmAbi>::Abi
Expand description
Rotate the PhotonImage on an arbitrary angle A rotated PhotonImage is returned.
NOTE: This is a naive implementation. Paeth rotation should be faster.
Arguments
img
- A PhotonImage. See the PhotonImage struct for details.angle
- Rotation angle in degrees.
Example
// For example, to rotate a PhotonImage by 30 degrees:
use photon_rs::native::open_image;
use photon_rs::transform::rotate;
let img = open_image("img.jpg").expect("File should open");
let rotated_img = rotate(&img, 30);