decoder: Pass on transformations_applied info

This prevents HEIF images from getting transformations applied
again that already has been applied by the decoder.

Closes #251
This commit is contained in:
Sophie Herold 2023-11-14 13:49:30 +01:00
parent c1ed2b97a6
commit abdd54def7
3 changed files with 5 additions and 3 deletions

1
NEWS
View file

@ -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
=======

View file

@ -72,6 +72,7 @@
<li>Sandboxed image interpretation is now enabled by default.</li>
<li>Printing now prints on the selected printer.</li>
<li>Image formats like GIFs with different frame lengs are now animated correctly.</li>
<li>Images of the formats HEIC and AVIF are now rotated correctly.</li>
</ul>
</description>
</release>

View file

@ -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);