image: Add rotation and auto rotate based on exif

This commit is contained in:
Sophie Herold 2022-11-03 17:40:06 +01:00
parent 3d6564377a
commit a2e6767584
10 changed files with 257 additions and 94 deletions

View file

@ -387,6 +387,12 @@ impl LpImageView {
}
}
pub fn rotate_image(&self) {
if let Some(current_page) = self.current_page() {
current_page.image().rotate();
}
}
pub fn set_background(&self) -> anyhow::Result<()> {
let background = self.uri().context("No URI for current file")?;
spawn!(clone!(@weak self as view =>