Function

GimpUiexport_image

Declaration [src]

GimpExportReturn
gimp_export_image (
  GimpImage** image,
  const gchar* format_name,
  GimpExportCapabilities capabilities
)

Description [src]

Takes an image to be saved together with a description of the capabilities of the image_format. If the type of image doesn’t match the capabilities of the format a dialog is opened that informs the user that the image has to be exported and offers to do the necessary conversions.

If the user chooses to export the image, a copy is created. This copy is then converted, image is changed to point to the new image and the procedure returns GIMP_EXPORT_EXPORT. The save_plugin has to take care of deleting the created image using gimp_image_delete() once the image has been saved.

If the user chooses to Ignore the export problem, image is not altered, GIMP_EXPORT_IGNORE is returned and the save_plugin should try to save the original image.

If format_name is NULL, no dialogs will be shown and this function will behave as if the user clicked on the ‘Export’ button, if a dialog would have been shown.

Parameters

image

Type: GimpImage

Pointer to the image.

The data is owned by the caller of the function.
format_name

Type: const gchar*

The (short) name of the image_format (e.g. JPEG or GIF).

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

Type: GimpExportCapabilities

What can the image_format do?

Return value

Type: GimpExportReturn

An enum of GimpExportReturn describing the user_action.