pub fn rotate(photon_img: &PhotonImage, angle: f32) -> PhotonImage
Expand description
Rotate the PhotonImage on an arbitrary angle A rotated PhotonImage is returned.
§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.0);