diff --git a/app/core/gimpimage-rotate.c b/app/core/gimpimage-rotate.c index 36e8dbf792..535225c569 100644 --- a/app/core/gimpimage-rotate.c +++ b/app/core/gimpimage-rotate.c @@ -269,11 +269,12 @@ gimp_image_import_rotation_metadata (GimpImage *image, if (policy == GIMP_METADATA_ROTATION_POLICY_ROTATE) gimp_image_metadata_rotate (image, context, - gexiv2_metadata_get_orientation (GEXIV2_METADATA (metadata)), + gexiv2_metadata_try_get_orientation (GEXIV2_METADATA (metadata), NULL), progress); - gexiv2_metadata_set_orientation (GEXIV2_METADATA (metadata), - GEXIV2_ORIENTATION_NORMAL); + gexiv2_metadata_try_set_orientation (GEXIV2_METADATA (metadata), + GEXIV2_ORIENTATION_NORMAL, + NULL); } } diff --git a/app/dialogs/metadata-rotation-import-dialog.c b/app/dialogs/metadata-rotation-import-dialog.c index ec5f0461d2..307c79fc0a 100644 --- a/app/dialogs/metadata-rotation-import-dialog.c +++ b/app/dialogs/metadata-rotation-import-dialog.c @@ -64,7 +64,7 @@ metadata_rotation_import_dialog_run (GimpImage *image, GExiv2Orientation orientation; metadata = gimp_image_get_metadata (image); - orientation = gexiv2_metadata_get_orientation (GEXIV2_METADATA (metadata)); + orientation = gexiv2_metadata_try_get_orientation (GEXIV2_METADATA (metadata), NULL); if (orientation <= GEXIV2_ORIENTATION_NORMAL || orientation > GEXIV2_ORIENTATION_MAX) diff --git a/libgimp/gimpimagemetadata.c b/libgimp/gimpimagemetadata.c index ee83d649be..234e69150c 100644 --- a/libgimp/gimpimagemetadata.c +++ b/libgimp/gimpimagemetadata.c @@ -210,8 +210,9 @@ gimp_image_metadata_load_finish (GimpImage *image, if (! (flags & GIMP_METADATA_LOAD_ORIENTATION)) { - gexiv2_metadata_set_orientation (GEXIV2_METADATA (metadata), - GEXIV2_ORIENTATION_UNSPECIFIED); + gexiv2_metadata_try_set_orientation (GEXIV2_METADATA (metadata), + GEXIV2_ORIENTATION_NORMAL, + NULL); } if (flags & GIMP_METADATA_LOAD_COLORSPACE) @@ -313,7 +314,7 @@ gimp_image_metadata_load_thumbnail (GFile *file, gimp_image_insert_layer (image, layer, NULL, 0); gimp_image_metadata_rotate (image, - gexiv2_metadata_get_orientation (GEXIV2_METADATA (metadata))); + gexiv2_metadata_try_get_orientation (GEXIV2_METADATA (metadata), NULL)); } g_object_unref (metadata);