Top |
GimpExportReturn | gimp_export_image () |
GtkWidget * | gimp_export_dialog_new () |
GtkWidget * | gimp_export_dialog_get_content_area () |
This function should be called by all save_plugins unless they are able to save all image formats GIMP knows about. It takes care of asking the user if she wishes to export the image to a format the save_plugin can handle. It then performs the necessary conversions (e.g. Flatten) on a copy of the image so that the image can be saved without changing the original image.
The capabilities of the save_plugin are specified by combining GimpExportCapabilities using a bitwise OR.
Make sure you have initialized GTK+ before you call this function as it will most probably have to open a dialog.
GimpExportReturn gimp_export_image (gint32 *image_ID
,gint32 *drawable_ID
,const gchar *format_name
,GimpExportCapabilities capabilities
);
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, the image_ID and drawable_ID
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()
when it has saved it.
If the user chooses to Ignore the export problem, the image_ID
and drawable_ID is 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.
GtkWidget * gimp_export_dialog_new (const gchar *format_name
,const gchar *role
,const gchar *help_id
);
Creates a new export dialog. All file plug-ins should use this
dialog to get a consistent look on the export dialogs. Use
gimp_export_dialog_get_content_area()
to get a GtkVBox to be
filled with export options. The export dialog is a wrapped
GimpDialog.
The dialog response when the user clicks on the Export button is
GTK_RESPONSE_OK
, and when the Cancel button is clicked it is
GTK_RESPONSE_CANCEL
.
format_name |
The short name of the image_format (e.g. JPEG or PNG). |
|
role |
The dialog's |
|
help_id |
The GIMP help id. |
Since: 2.8
GtkWidget *
gimp_export_dialog_get_content_area (GtkWidget *dialog
);
Returns the GtkVBox of the passed export dialog to be filled with export options.
Since: 2.8
The types of images and layers an export procedure can handle