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 storing it in an exported file.
Note: There is normally no need to call this function because it’s
already called by GimpExportProcedure
at the start and the
metadata is passed to the run()
callback.
You may call it separately for instance if you set export_metadata
to NULL
in gimp_export_procedure_new()
to prevent libgimp
from trying to store the metadata in the exported file, yet you wish
to process and store the metadata yourself using custom API.
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 ignore suggested_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 GimpMetadataSaveFlags
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 metadata to export.
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. |