<?xml version="1.0"?>
<page id="Gimp.Image.metadata_save_prepare"
      type="topic"
      style="method"
      xmlns="http://projectmallard.org/1.0/"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/1.0/ui/">
  <info>
    <link xref="Gimp.Image" group="method" type="guide"/>
    <api:function>
      <api:returns>
        <api:type>Gimp.Metadata</api:type>
      </api:returns>
      <api:name>gimp_image_metadata_save_prepare</api:name>
      <api:arg>
        <api:type>String</api:type>
        <api:name>mime_type</api:name>
      </api:arg>
      <api:arg>
        <api:type>Gimp.MetadataSaveFlags</api:type>
        <api:name>suggested_flags</api:name>
      </api:arg>
    </api:function>
  </info>
  <title>Gimp.Image.prototype.metadata_save_prepare</title>
  <synopsis><code mime="text/x-gjs">
function metadata_save_prepare(mime_type: String, suggested_flags: <link xref="Gimp.MetadataSaveFlags">Gimp.MetadataSaveFlags</link>): <link xref="Gimp.Metadata">Gimp.Metadata</link> {
    // Gjs wrapper for gimp_image_metadata_save_prepare()
}
  </code></synopsis>
  <p>Gets the image metadata for saving it using
<link xref="Gimp.Image.metadata_save_finish"/>.</p>  <p>The <code>suggested_flags</code> 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.</p>  <p>The suggested value for <link xref="Gimp.MetadataSaveFlags"/>.thumbnail is determined by
whether there was a thumbnail in the previously imported image.</p>
  <p>Since 2.10</p>
<terms>
<item>
<title><code>mime_type</code></title>
  <p>The saved file's mime-type</p>
</item>
<item>
<title><code>suggested_flags</code></title>
  <p>Suggested default values for the @flags passed to
                  <link xref="Gimp.Image.metadata_save_finish"/></p>
</item>
<item>
<title><code>Returns</code></title>
  <p>The image's metadata, prepared for saving.</p>
</item>
</terms>

</page>
