glycin-core 4.0.0-alpha

Sandboxed image decoding
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use glycin_utils::{Frame, FungibleMemory};

use crate::Image;

pub fn apply_exif_orientation(
    frame: Frame<FungibleMemory>,
    image: &Image,
) -> Frame<FungibleMemory> {
    if image.details().transformation_ignore_exif() {
        frame
    } else {
        let orientation = image.transformation_orientation();
        glycin_utils::editing::change_orientation(frame, orientation)
    }
}