Skip to main content

apply_document_orientation

Function apply_document_orientation 

Source
pub fn apply_document_orientation(
    image: ImageBuffer<Rgb<u8>, Vec<u8>>,
    angle: f32,
) -> ImageBuffer<Rgb<u8>, Vec<u8>>
Expand description

Applies document orientation rotation to an image

This function rotates an image based on the detected orientation angle. It supports rotation by 0°, 90°, 180°, and 270° degrees.

§Arguments

  • image - The input image to rotate
  • angle - The rotation angle in degrees (0, 90, 180, or 270)

§Returns

The rotated image