GNOME Bugzilla – Bug 676696
Automatic EXIF image rotation doesn't work
Last modified: 2013-03-14 22:36:31 UTC
Created attachment 214828 [details] sample Supposedly implemented in bug 598305, but the following email does not show the attachment properly rotated in Evolution 3.2. Opening the image file in Eye of GNOME displays the correct orientation. Attached is the sample email file that exhibits this behavior.
It was implemented as part of the "image-inline" module which used GtkImageView. Unfortunately GtkImageView has yet to be ported to gtk3 so we had to disable the module.
In any case, I suspect everything will probably change again with the port to webkit?
I guess we could use some libexif to detect orientation and then rotate the image through native CSS3 -webkit-transform: rotate(180deg); From what I can see that's all what the image-inline can do (+ autoscaling the image to match the window, but WebKit handles that automatically already).
It scaled the image to the window size, but for really large images GtkImageView also let you click the image to get a full size but clipped view and then click and drag to pan around like in Google Maps. But sadly I think GtkImageView is a dead project and won't see a gtk3 port. You don't need to ask libexif directly to get orientation, you can just query a GdkPixbuf for an "orientation" option like this: http://git.gnome.org/browse/evolution/tree/plugins/image-inline/image-inline.c#n50 I assume you would work that directly into EMFormatHTML or EWebView? After which we could probably just kill the "image-inline" plugin.
I discovered that WebCore is capable of handling EXIF orientations automatically, but the feature is disabled by default and the setting that controls it is not exposed through WebKitWebSettings. I put in a plea on the mailing list for a new GObject property: https://lists.webkit.org/pipermail/webkit-gtk/2013-March/001372.html
My request made it into WebKitGTK+ 2.0. I'm having Evolution test for the new WebKit setting and enable it if present, so this should start working again in Evolution 3.8 once WebKitGTK+ 2.0 is installed. Fixed in: https://git.gnome.org/browse/evolution/commit/?id=035fa295cd121615924fb64a219a8cbb06df9155