Gimp.Image.metadata_save_prepare

@accepts(Gimp.Image, unicode, Gimp.MetadataSaveFlags)
@returns(Gimp.Metadata)
def metadata_save_prepare(self, mime_type, suggested_flags):
    # Python wrapper for gimp_image_metadata_save_prepare()
  

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 [class@ExportProcedure] 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 None in [ctor@Gimp.ExportProcedure.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 [flags@Gimp.MetadataSaveFlags.THUMBNAIL] is determined by whether there was a thumbnail in the previously imported image.

Since 2.10

self

The original image

mime_type

The saved file's mime-type

suggested_flags

Suggested default values for the metadata to export.

Returns