Function

GimpUiexport_image

Declaration [src]

GimpExportReturn
gimp_export_image (
  GimpImage** image,
  gint* n_drawables,
  GimpDrawable*** drawables,
  const gchar* format_name,
  GimpExportCapabilities capabilities
)

Description [src]

Takes an image and a drawable 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 and drawables are 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() and the drawables list with g_free() once the image has been saved.

If the user chooses to Ignore the export problem, image and drawables are not altered, GIMP_EXPORT_IGNORE is returned and the save_plugin should try to save the original image. If the user chooses Cancel, GIMP_EXPORT_CANCEL is returned and the save_plugin should quit itself with status GIMP_PDB_CANCEL.

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.
n_drawables

Type: gint*

Size of drawables.

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

Type: An array of GimpDrawable**

Array of pointers to drawables.

The length of the array is specified in the n_drawables argument.
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.