Method

GimpImagemetadata_save_prepare

since: 2.10

Declaration [src]

GimpMetadata*
gimp_image_metadata_save_prepare (
  GimpImage* image,
  const gchar* mime_type,
  GimpMetadataSaveFlags* suggested_flags
)

Description [src]

Gets the image metadata for saving it using gimp_image_metadata_save_finish().

The suggested_flags are determined from what kind of metadata (Exif, XMP, …) is actually present in the image and the preferences for metadata exporting. The calling application may still update available_flags, for instance to follow the settings from a previous export in the same session, or a previous export of the same image. But it should not override the preferences without a good reason since it is a data leak.

The suggested value for GIMP_METADATA_SAVE_THUMBNAIL is determined by whether there was a thumbnail in the previously imported image.

Available since: 2.10

Parameters

mime_type

Type: const gchar*

The saved file’s mime-type.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
suggested_flags

Type: GimpMetadataSaveFlags

Suggested default values for the flags passed to gimp_image_metadata_save_finish()

The data is owned by the caller of the function.

Return value

Type: GimpMetadata

The image’s metadata, prepared for saving.

The caller of the method takes ownership of the data, and is responsible for freeing it.