diff --git a/NEWS b/NEWS
index 5e8998e..ee5d8c5 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
- Fix print dialog needs second confirmation inside Flatpaks
- Fix SVGs sometimes not re-rendering for zoom level
- Fix animated image formats with variable frame length using only one length
+- Fix rotation getting applied twice to HEIF images
45.0
=======
diff --git a/data/org.gnome.Loupe.metainfo.xml.in.in b/data/org.gnome.Loupe.metainfo.xml.in.in
index 5ccd220..1c68f45 100644
--- a/data/org.gnome.Loupe.metainfo.xml.in.in
+++ b/data/org.gnome.Loupe.metainfo.xml.in.in
@@ -72,6 +72,7 @@
Sandboxed image interpretation is now enabled by default.
Printing now prints on the selected printer.
Image formats like GIFs with different frame lengs are now animated correctly.
+ Images of the formats HEIC and AVIF are now rotated correctly.
diff --git a/src/decoder/formats/glycin_proxy.rs b/src/decoder/formats/glycin_proxy.rs
index 7c545a9..8893f05 100644
--- a/src/decoder/formats/glycin_proxy.rs
+++ b/src/decoder/formats/glycin_proxy.rs
@@ -62,9 +62,9 @@ impl Glycin {
let image = image_request.request().await?;
if let Some(exif_raw) = image.info().exif.clone().into() {
- updater.send(DecoderUpdate::Metadata(ImageMetadata::from_exif_bytes(
- exif_raw,
- )));
+ let mut metadata = ImageMetadata::from_exif_bytes(exif_raw);
+ metadata.heif_transform = image.info().transformations_applied;
+ updater.send(DecoderUpdate::Metadata(metadata));
}
let dimensions = (image.info().width, image.info().height);