# GimpUi.export_image

    @accepts(Gimp.Image, int, [Gimp.Drawable], unicode, GimpUi.ExportCapabilities)
    @returns(GimpUi.ExportReturn)
    def export_image(image, n_drawables, drawables, format_name, capabilities):
        # Python wrapper for gimp_export_image()

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

image

  Pointer to the image.

n_drawables

  Size of drawables.

drawables

  Array of pointers to drawables.

format_name

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

capabilities

  What can the image_format do?

Returns