From f796286650e4ad862b147e484d528ca56cf5e0e6 Mon Sep 17 00:00:00 2001 From: Ferdinand Stehle Date: Sat, 22 Feb 2025 16:32:33 +0100 Subject: Apply image orientation in conversation view (#1672) * Apply image orientation in conversation * Load the full image into pixbuf --------- Co-authored-by: fiaxh --- main/src/ui/conversation_content_view/file_image_widget.vala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'main') diff --git a/main/src/ui/conversation_content_view/file_image_widget.vala b/main/src/ui/conversation_content_view/file_image_widget.vala index a7a7bcc0..2b4d1765 100644 --- a/main/src/ui/conversation_content_view/file_image_widget.vala +++ b/main/src/ui/conversation_content_view/file_image_widget.vala @@ -157,7 +157,12 @@ public class FileImageWidget : Widget { public async void load_from_file(File file, string file_name) throws GLib.Error { FixedRatioPicture image = new FixedRatioPicture() { min_width=100, min_height=100, max_width=600, max_height=300 }; - image.file = file; + + // Work-around because Gtk.Picture does not apply the orientation itself + Gdk.Pixbuf? pixbuf = new Pixbuf.from_file(file.get_path()); + pixbuf = pixbuf.apply_embedded_orientation(); + image.paintable = Texture.for_pixbuf(pixbuf); + stack.add_child(image); stack.set_visible_child(image); } -- cgit v1.2.3-70-g09d2