mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 05:22:40 +02:00
Issue #2275: rotate commands not actually applied to the image.
The rotation was actually applied but the image had an orientation metadata stored which is not visible in GIMP canvas (only checked at import). If GIMP had on-canvas viewing support of the orientation metadata, then it would make sense to keep it between import and export, but since it doesn't, we should assume that when someone asks to "Keep Original" during import, they are actually asking to drop the metadata (which actually can be wrong in various cases, in particular when you snap pictures of the ground or the sky, then sensors are lost anyway and regularly can't guess what orientation you wanted). This will make for less unexpected exports.
This commit is contained in:
@@ -85,7 +85,25 @@ gimp_image_metadata_load_finish (GimpImage *image,
|
||||
{
|
||||
if (! gimp_image_metadata_rotate_query (image, mime_type,
|
||||
metadata))
|
||||
flags &= ~GIMP_METADATA_LOAD_ORIENTATION;
|
||||
{
|
||||
/* If one explicitly asks not to rotate the image, just
|
||||
* drop the "Orientation" metadata because that's how one
|
||||
* wants to see the image.
|
||||
*
|
||||
* Note that there might be special cases where one wants
|
||||
* to keep the pixel as-is while keeping rotation through
|
||||
* metadata. But we don't have good enough metadata
|
||||
* support for this yet, in particular we don't honor the
|
||||
* orientation metadata when viewing the image. So this
|
||||
* only ends up in unexpected exports with rotation
|
||||
* because people forgot there was such metadata set and
|
||||
* stored by GIMP. If maybe some day we have code to honor
|
||||
* orientation while viewing an image, then we can do this
|
||||
* a bit cleverer.
|
||||
*/
|
||||
gexiv2_metadata_set_orientation (GEXIV2_METADATA (metadata),
|
||||
GEXIV2_ORIENTATION_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user