gimpmetadata

gimpmetadata

Functions

Description

Functions

gimp_image_metadata_load_prepare ()

GimpMetadata *
gimp_image_metadata_load_prepare (GimpImage *image,
                                  const gchar *mime_type,
                                  GFile *file,
                                  GError **error);

Loads and returns metadata from file to be passed into gimp_image_metadata_load_finish().

Parameters

image

The image

 

mime_type

The loaded file's mime-type

 

file

The file to load the metadata from

 

error

Return location for error

 

Returns

The file's metadata.

[transfer full]

Since: 2.10


gimp_image_metadata_load_finish ()

void
gimp_image_metadata_load_finish (GimpImage *image,
                                 const gchar *mime_type,
                                 GimpMetadata *metadata,
                                 GimpMetadataLoadFlags flags,
                                 gboolean interactive);

Applies the metadata previously loaded with gimp_image_metadata_load_prepare() to the image, taking into account the passed flags .

Parameters

image

The image

 

mime_type

The loaded file's mime-type

 

metadata

The metadata to set on the image

 

flags

Flags to specify what of the metadata to apply to the image

 

interactive

Whether this function is allowed to query info with dialogs

 

Since: 2.10


gimp_image_metadata_save_prepare ()

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

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.

Parameters

image

The original image

 

mime_type

The saved file's mime-type

 

suggested_flags

Suggested default values for the flags passed to gimp_image_metadata_save_finish()

 

Returns

The image's metadata, prepared for saving.

[transfer full]

Since: 2.10


gimp_image_metadata_save_finish ()

gboolean
gimp_image_metadata_save_finish (GimpImage *image,
                                 const gchar *mime_type,
                                 GimpMetadata *metadata,
                                 GimpMetadataSaveFlags flags,
                                 GFile *file,
                                 GError **error);

Saves the metadata retrieved from the image with gimp_image_metadata_save_prepare() to file , taking into account the passed flags .

Note that the image passed to this function might be different from the image passed to gimp_image_metadata_save_prepare(), due to whatever file export conversion happened in the meantime

Parameters

image

The actually saved image

 

mime_type

The saved file's mime-type

 

metadata

The metadata to write to file

 

flags

Flags to specify what of the metadata to save

 

file

The file image was saved to

 

error

Return location for error message

 

Returns

Whether the save was successful.

Since: 2.10


gimp_image_metadata_load_thumbnail ()

GimpImage *
gimp_image_metadata_load_thumbnail (GFile *file,
                                    GError **error);

Retrieves a thumbnail from metadata if present.

Parameters

file

A GFile image

 

error

Return location for error message

 

Returns

a GimpImage of the file thumbnail.

[transfer none][nullable]

Since: 2.10