diff --git a/app/file/file-save.c b/app/file/file-save.c index 881332d23b..48c0277060 100644 --- a/app/file/file-save.c +++ b/app/file/file-save.c @@ -92,8 +92,10 @@ file_save (Gimp *gimp, gimp_image_saving (image); - /* TEMP - Remove later */ - options = gimp_export_options_new (); + /* XXX - In the future, we'll pass special generic export options this + * way (e.g. crops, resize, filter run at export or others). + */ + options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, NULL); drawables_list = gimp_image_get_selected_drawables (image); diff --git a/app/pdb/file-cmds.c b/app/pdb/file-cmds.c index 140ec0728f..3addd25421 100644 --- a/app/pdb/file-cmds.c +++ b/app/pdb/file-cmds.c @@ -493,7 +493,8 @@ register_file_procs (GimpPDB *pdb) "gimp-file-save"); gimp_procedure_set_static_help (procedure, "Saves a file by extension.", - "This procedure invokes the correct file save handler according to the file's extension and/or prefix.", + "This procedure invokes the correct file save handler according to the file's extension and/or prefix.\n" + "The @options argument is currently unused and should be set to %NULL right now.", NULL); gimp_procedure_set_static_attribution (procedure, "Josh MacDonald", diff --git a/app/plug-in/gimpplugin-proc.c b/app/plug-in/gimpplugin-proc.c index 7aa8055951..8d88ea1597 100644 --- a/app/plug-in/gimpplugin-proc.c +++ b/app/plug-in/gimpplugin-proc.c @@ -393,7 +393,8 @@ gimp_plug_in_set_file_proc_save_handler (GimpPlugIn *plug_in, if ((procedure->num_args < 4) || ! GIMP_IS_PARAM_SPEC_RUN_MODE (procedure->args[0]) || ! GIMP_IS_PARAM_SPEC_IMAGE (procedure->args[1]) || - ! GIMP_IS_PARAM_SPEC_FILE (procedure->args[2])) + ! GIMP_IS_PARAM_SPEC_FILE (procedure->args[2]) || + ! GIMP_IS_PARAM_SPEC_EXPORT_OPTIONS (procedure->args[3])) { g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_FAILED, "Plug-in \"%s\"\n(%s)\n" diff --git a/libgimp/gimpexportoptions.c b/libgimp/gimpexportoptions.c index de342a8785..22fca36c2d 100644 --- a/libgimp/gimpexportoptions.c +++ b/libgimp/gimpexportoptions.c @@ -528,23 +528,34 @@ export_action_perform (const ExportAction *action, /** * gimp_export_options_get_image: - * @options: The #GimpExportOptions object. - * @image: Pointer to the image. + * @options: (transfer none): The #GimpExportOptions object. + * @image: (inout) (transfer none): the image. * - * Takes an image to be saved together with a description - * of the capabilities of the image_format. 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. + * Takes an image to be exported, possibly creating a temporary copy + * modified according to export settings in @options (such as the + * capabilities of the export format). * - * Returns: An enum of #GimpExportReturn describing the user_action. + * If necessary, a copy is created, converted and modified, @image + * changed to point to the new image and the procedure returns + * [enum@ExportReturn.EXPORT]. + * In this case, you must take care of deleting the created image using + * [method@Image.delete] once the image has been exported, unless you + * were planning to display it with [ctor@Display.new], or you will leak + * memory. + * + * If [enum@ExportReturn.IGNORE] is returned, then @image is still the + * original image. You should neither modify it, nor should you delete + * it in the end. If you wish to temporarily modify the image before + * export anyway, call [method@Image.duplicate] when + * [enum@ExportReturn.IGNORE] was returned. + * + * Returns: An enum of #GimpExportReturn. * * Since: 3.0 **/ GimpExportReturn -gimp_export_options_get_image (GimpExportOptions *options, - GimpImage **image) +gimp_export_options_get_image (GimpExportOptions *options, + GimpImage **image) { GSList *actions = NULL; GimpImageBaseType type; @@ -557,12 +568,19 @@ gimp_export_options_get_image (GimpExportOptions *options, gboolean background_has_alpha = TRUE; GimpExportReturn retval = GIMP_EXPORT_IGNORE; - g_return_val_if_fail (gimp_image_is_valid (*image), FALSE); - g_return_val_if_fail (options != NULL, FALSE); + g_return_val_if_fail (image && gimp_image_is_valid (*image), GIMP_EXPORT_IGNORE); + g_return_val_if_fail (GIMP_IS_EXPORT_OPTIONS (options), GIMP_EXPORT_IGNORE); /* Get capabilities from ExportOptions */ g_object_get (options, "capabilities", &capabilities, NULL); + g_return_val_if_fail (capabilities & (GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_INDEXED | + GIMP_EXPORT_CAN_HANDLE_BITMAP), + GIMP_EXPORT_IGNORE); + + /* do some sanity checks */ if (capabilities & GIMP_EXPORT_NEEDS_ALPHA) capabilities |= GIMP_EXPORT_CAN_HANDLE_ALPHA; diff --git a/libgimp/gimpexportoptions.h b/libgimp/gimpexportoptions.h index 073e33fe2a..255e7998d8 100644 --- a/libgimp/gimpexportoptions.h +++ b/libgimp/gimpexportoptions.h @@ -34,9 +34,9 @@ G_BEGIN_DECLS /** * GimpExportReturn: * @GIMP_EXPORT_IGNORE: The image is unmodified but export shall continue anyway - * @GIMP_EXPORT_EXPORT: The chosen transforms were applied to the image + * @GIMP_EXPORT_EXPORT: The chosen transforms were applied to a new image * - * Possible return values of gimp_export_image(). + * Possible return values of [method@ExportOptions.get_image]. **/ typedef enum { @@ -46,7 +46,7 @@ typedef enum GimpExportReturn gimp_export_options_get_image (GimpExportOptions *options, - GimpImage **image); + GimpImage **image) G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS diff --git a/libgimp/gimpexportprocedure.c b/libgimp/gimpexportprocedure.c index 89d22602b2..9b6cdb52bb 100644 --- a/libgimp/gimpexportprocedure.c +++ b/libgimp/gimpexportprocedure.c @@ -65,8 +65,9 @@ struct _GimpExportProcedure GDestroyNotify run_data_destroy; GimpExportCapabilities capabilities; - GimpExportOptionsEditFunc create_func; - gpointer create_data; + GimpExportOptionsEditFunc edit_func; + gpointer edit_data; + GDestroyNotify edit_data_destroy; gboolean supports_exif; gboolean supports_iptc; @@ -440,14 +441,14 @@ gimp_export_procedure_run (GimpProcedure *procedure, * so we'll make sure it's initialized */ if (options == NULL) { - options = gimp_export_options_new (); + options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, NULL); free_options = TRUE; } - if (export_proc->create_func != NULL) + if (export_proc->edit_func != NULL) { - export_proc->create_func (procedure, config, options, - export_proc->create_data); + export_proc->edit_func (procedure, config, options, + export_proc->edit_data); g_signal_connect_object (config, "notify", G_CALLBACK (gimp_export_procedure_update_options), @@ -485,6 +486,9 @@ gimp_export_procedure_run (GimpProcedure *procedure, g_object_unref (config); gimp_value_array_unref (remaining); + if (export_proc->edit_data_destroy && export_proc->edit_data) + export_proc->edit_data_destroy (export_proc->edit_data); + return return_values; } @@ -582,8 +586,8 @@ gimp_export_procedure_update_options (GimpProcedureConfig *config, procedure = gimp_procedure_config_get_procedure (config); export_proc = GIMP_EXPORT_PROCEDURE (procedure); - export_proc->create_func (procedure, config, options, - export_proc->create_data); + export_proc->edit_func (procedure, config, options, + export_proc->edit_data); } @@ -662,8 +666,9 @@ gimp_export_procedure_new (GimpPlugIn *plug_in, * gimp_export_procedure_set_capabilities: * @procedure: a #GimpProcedure. * @capabilities: a #GimpExportCapabilities enum - * @create_func: (nullable): callback function to update export options - * @create_data: (nullable): data for @create_func + * @edit_func: (nullable): callback function to update export options + * @edit_data: (nullable): data for @edit_func + * @edit_data_destroy: (nullable): free function for @edit_data, or %NULL * * Sets default #GimpExportCapabilities for image export. * @@ -672,8 +677,9 @@ gimp_export_procedure_new (GimpPlugIn *plug_in, void gimp_export_procedure_set_capabilities (GimpExportProcedure *procedure, GimpExportCapabilities capabilities, - GimpExportOptionsEditFunc create_func, - gpointer create_data) + GimpExportOptionsEditFunc edit_func, + gpointer edit_data, + GDestroyNotify edit_data_destroy) { g_return_if_fail (GIMP_IS_EXPORT_PROCEDURE (procedure)); @@ -684,10 +690,11 @@ gimp_export_procedure_set_capabilities (GimpExportProcedure *procedure, /* TODO: Do more with this when we have user-specified callbacks for * image capabilities */ - if (create_func != NULL) + if (edit_func != NULL) { - procedure->create_func = create_func; - procedure->create_data = create_data; + procedure->edit_func = edit_func; + procedure->edit_data = edit_data; + procedure->edit_data_destroy = edit_data_destroy; } } diff --git a/libgimp/gimpexportprocedure.h b/libgimp/gimpexportprocedure.h index e52eceed6f..c551616f47 100644 --- a/libgimp/gimpexportprocedure.h +++ b/libgimp/gimpexportprocedure.h @@ -95,8 +95,9 @@ GimpProcedure * gimp_export_procedure_new (GimpPlugIn void gimp_export_procedure_set_capabilities (GimpExportProcedure *procedure, GimpExportCapabilities capabilities, - GimpExportOptionsEditFunc create_func, - gpointer create_data); + GimpExportOptionsEditFunc edit_func, + gpointer edit_data, + GDestroyNotify edit_data_destroy); void gimp_export_procedure_set_support_exif (GimpExportProcedure *procedure, diff --git a/libgimp/gimpfile_pdb.c b/libgimp/gimpfile_pdb.c index 68bbf8e719..9525f475d3 100644 --- a/libgimp/gimpfile_pdb.c +++ b/libgimp/gimpfile_pdb.c @@ -179,12 +179,14 @@ gimp_file_load_layers (GimpRunMode run_mode, * @run_mode: The run mode. * @image: Input image. * @file: The file to save the image in. - * @options: Export option settings. + * @options: (nullable): Export option settings. * * Saves a file by extension. * * This procedure invokes the correct file save handler according to * the file's extension and/or prefix. + * The @options argument is currently unused and should be set to %NULL + * right now. * * Returns: TRUE on success. **/ diff --git a/libgimp/gimpgpparams-body.c b/libgimp/gimpgpparams-body.c index d2115348c7..ba4ac6d0b5 100644 --- a/libgimp/gimpgpparams-body.c +++ b/libgimp/gimpgpparams-body.c @@ -942,11 +942,11 @@ gimp_gp_param_to_value (gpointer gimp, } else if (g_type_is_a (G_VALUE_TYPE (value), GIMP_TYPE_EXPORT_OPTIONS)) { - GimpExportOptions *options = gimp_export_options_new (); + GimpExportOptions *options; - g_object_set (options, - "capabilities", param->data.d_export_options.capabilities, - NULL); + options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, + "capabilities", param->data.d_export_options.capabilities, + NULL); g_value_set_object (value, options); diff --git a/libgimp/tests/meson.build b/libgimp/tests/meson.build index 6f42a17b62..aa35db8eeb 100644 --- a/libgimp/tests/meson.build +++ b/libgimp/tests/meson.build @@ -8,6 +8,7 @@ endif tests = [ 'color-parser', + 'export-options', 'image', 'palette', 'selection-float', diff --git a/libgimp/tests/test-export-options.c b/libgimp/tests/test-export-options.c new file mode 100644 index 0000000000..2a1f270e14 --- /dev/null +++ b/libgimp/tests/test-export-options.c @@ -0,0 +1,98 @@ +/* Sometimes odd dimensions may create weird situations. It's usually a + * good idea to test both even and odd dimensions. + */ +#define NEW_IMAGE_WIDTH 1920 +#define NEW_IMAGE_HEIGHT 2001 + +static GimpValueArray * +gimp_c_test_run (GimpProcedure *procedure, + GimpRunMode run_mode, + GimpImage *image, + gint n_drawables, + GimpDrawable **drawables, + GimpProcedureConfig *config, + gpointer run_data) +{ + GimpImage **images; + GimpLayer **layers; + GeglBufferIterator *iter; + GeglBuffer *buffer1; + GeglBuffer *buffer2; + const Babl *format; + GimpImage *new_image; + GimpImage *original_image; + GimpTextLayer *text_layer; + GimpLayer *layer; + GimpLayer *export_layer; + GimpExportOptions *options; + GimpExportReturn delete; + gint n_images; + gint n_layers; + gboolean identical_buffers; + + new_image = gimp_image_new (NEW_IMAGE_WIDTH, NEW_IMAGE_HEIGHT, GIMP_RGB); + text_layer = gimp_text_layer_new (new_image, "hello world", gimp_context_get_font (), + 20, gimp_unit_point ()); + gimp_image_insert_layer (new_image, GIMP_LAYER (text_layer), NULL, 0); + text_layer = gimp_text_layer_new (new_image, "annyeong uju", gimp_context_get_font (), + 20, gimp_unit_point ()); + gimp_image_insert_layer (new_image, GIMP_LAYER (text_layer), NULL, 0); + + options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, + "capabilities", GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA, + NULL); + + GIMP_TEST_START("Verify start state (1)"); + images = gimp_get_images (&n_images); + GIMP_TEST_END(n_images == 1 && images[0] == new_image); + g_free (images); + + GIMP_TEST_START("Verify start state (2)"); + layers = gimp_image_get_layers (new_image, &n_layers); + GIMP_TEST_END(n_layers == 2); + g_free (layers); + + original_image = new_image; + + GIMP_TEST_START("gimp_export_options_get_image() created a new image"); + delete = gimp_export_options_get_image (options, &new_image); + images = gimp_get_images (&n_images); + GIMP_TEST_END(delete == GIMP_EXPORT_EXPORT && n_images == 2 && new_image != original_image); + g_free (images); + + GIMP_TEST_START("The new image has a single layer"); + layers = gimp_image_get_layers (new_image, &n_layers); + GIMP_TEST_END(n_layers == 1); + + export_layer = layers[0]; + g_free (layers); + + layer = gimp_image_merge_visible_layers (original_image, GIMP_CLIP_TO_IMAGE); + + GIMP_TEST_START("Compare export buffer with original image's merged buffer"); + buffer1 = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer)); + buffer2 = gimp_drawable_get_buffer (GIMP_DRAWABLE (export_layer)); + format = gegl_buffer_get_format (buffer1); + iter = gegl_buffer_iterator_new (buffer1, NULL, 0, format, + GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 2); + gegl_buffer_iterator_add (iter, buffer2, NULL, 0, format, + GEGL_ACCESS_READ, GEGL_ABYSS_NONE); + + identical_buffers = TRUE; + while (gegl_buffer_iterator_next (iter)) + { + const gfloat *src1 = (const gfloat *) iter->items[0].data; + const gfloat *src2 = (const gfloat *) iter->items[1].data; + gint count = iter->length; + + if (memcmp (src1, src2, count * babl_format_get_bytes_per_pixel (format)) != 0) + { + identical_buffers = FALSE; + break; + } + } + GIMP_TEST_END(identical_buffers == TRUE); + + + GIMP_TEST_RETURN +} diff --git a/libgimp/tests/test-export-options.py b/libgimp/tests/test-export-options.py new file mode 100644 index 0000000000..2b01d22e64 --- /dev/null +++ b/libgimp/tests/test-export-options.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 + +NEW_IMAGE_WIDTH=1920 +NEW_IMAGE_HEIGHT=2001 + +image = Gimp.Image.new(NEW_IMAGE_WIDTH, NEW_IMAGE_HEIGHT, Gimp.ImageBaseType.RGB) +text_layer = Gimp.TextLayer.new(image, "hello world", Gimp.context_get_font(), 20, Gimp.Unit.point()) +image.insert_layer(text_layer, None, 0) +text_layer = Gimp.TextLayer.new(image, "annyeong uju", Gimp.context_get_font(), 20, Gimp.Unit.point()) +image.insert_layer(text_layer, None, 0) + +images = Gimp.get_images() +layers = image.get_layers() +gimp_assert('Verify start state', len(images) == 1 and images[0] == image and len(layers) == 2) + +options = Gimp.ExportOptions() +options.set_property ("capabilities", + Gimp.ExportCapabilities.CAN_HANDLE_RGB | + Gimp.ExportCapabilities.CAN_HANDLE_ALPHA) + +delete, export_image = options.get_image(image) + +gimp_assert('Gimp.ExportOptions.get_image() created a new image', delete == Gimp.ExportReturn.EXPORT and export_image != image) +export_layers = export_image.get_layers() +gimp_assert('The new image has a single layer', len(export_layers) == 1) + +merged_layer = image.merge_visible_layers(Gimp.MergeType.CLIP_TO_IMAGE) +merged_layer.resize_to_image_size() + +buffer1 = merged_layer.get_buffer() +buffer2 = export_layers[0].get_buffer() +l1 = buffer1.get(buffer1.get_extent(), 1.0, None, Gegl.AbyssPolicy.NONE) +l2 = buffer2.get(buffer2.get_extent(), 1.0, None, Gegl.AbyssPolicy.NONE) +gimp_assert("Compare export buffer with original image's merged buffer", l1 == l2) diff --git a/libgimpbase/gimpbase.def b/libgimpbase/gimpbase.def index 57713e91b9..353cce15e3 100644 --- a/libgimpbase/gimpbase.def +++ b/libgimpbase/gimpbase.def @@ -56,7 +56,6 @@ EXPORTS gimp_env_init gimp_escape_uline gimp_export_options_get_type - gimp_export_options_new gimp_file_get_utf8_name gimp_file_has_extension gimp_file_show_in_file_manager diff --git a/libgimpbase/gimpexportoptions.c b/libgimpbase/gimpexportoptions.c index b1352170f7..c71fc86822 100644 --- a/libgimpbase/gimpexportoptions.c +++ b/libgimpbase/gimpexportoptions.c @@ -26,6 +26,22 @@ #include "gimpexportoptions.h" +/** + * SECTION: gimpexportoptions + * @title: gimpexportoptions + * @short_description: Generic Export Options + * + * A class holding generic export options. + + * Note: right now, GIMP does not provide any generic export option to + * manipulate, and there is practically no reason for you to create this + * object yourself. In Export PDB procedure, or again in functions such + * as [func@Gimp.file_save], you may just pass %NULL. + * + * In the future, this object will enable to pass various generic + * options, such as ability to crop or resize images at export time. + **/ + enum { PROP_0, @@ -68,9 +84,9 @@ gimp_export_options_class_init (GimpExportOptionsClass *klass) object_class->set_property = gimp_export_options_set_property; /** - * GimpExportProcedure:capabilities: + * GimpExportOptions:capabilities: * - * What #GimpExportCapabilities are supported + * What [flags@ExportCapabilities] are supported. * * Since: 3.0.0 */ @@ -135,15 +151,3 @@ gimp_export_options_get_property (GObject *object, break; } } - -/* public functions */ - -GimpExportOptions * -gimp_export_options_new (void) -{ - GimpExportOptions *options; - - options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, NULL); - - return options; -} diff --git a/libgimpbase/gimpexportoptions.h b/libgimpbase/gimpexportoptions.h index 771c46d784..5e1392d487 100644 --- a/libgimpbase/gimpexportoptions.h +++ b/libgimpbase/gimpexportoptions.h @@ -68,9 +68,6 @@ typedef enum } GimpExportCapabilities; -GimpExportOptions * gimp_export_options_new (void); - - G_END_DECLS #endif /* __GIMP_EXPORT_OPTIONS_H__ */ diff --git a/pdb/groups/file.pdb b/pdb/groups/file.pdb index 12329501fc..66ec1164b2 100644 --- a/pdb/groups/file.pdb +++ b/pdb/groups/file.pdb @@ -222,6 +222,9 @@ sub file_save { $help = <<'HELP'; This procedure invokes the correct file save handler according to the file's extension and/or prefix. + +The @options argument is currently unused and should be set to %NULL +right now. HELP &josh_pdb_misc('1997'); diff --git a/pdb/pdb.pl b/pdb/pdb.pl index a296a7936e..1766ed6133 100644 --- a/pdb/pdb.pl +++ b/pdb/pdb.pl @@ -487,7 +487,8 @@ package Gimp::CodeGen::pdb; type => 'GimpExportOptions *', const_type => 'GimpExportOptions *', init_value => 'NULL', - out_annotate => '(transfer none)', + in_annotate => '(nullable)', + out_annotate => '(transfer full)', get_value_func => '$var = g_value_get_object ($value)', dup_value_func => '$var = g_value_dup_object (gimp_value_array_index ($value))', set_value_func => 'g_value_set_object ($value, $var)', diff --git a/plug-ins/common/file-aa.c b/plug-ins/common/file-aa.c index 540e2c5a6c..56299cbee0 100644 --- a/plug-ins/common/file-aa.c +++ b/plug-ins/common/file-aa.c @@ -154,7 +154,7 @@ ascii_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); for (i = 0; aa_formats[i]; i++); diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c index 62fdebf104..5ba749ea66 100644 --- a/plug-ins/common/file-cel.c +++ b/plug-ins/common/file-cel.c @@ -188,7 +188,7 @@ cel_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_file_argument (procedure, "palette-file", _("_Palette file"), diff --git a/plug-ins/common/file-csource.c b/plug-ins/common/file-csource.c index 39c7b1b208..e883413130 100644 --- a/plug-ins/common/file-csource.c +++ b/plug-ins/common/file-csource.c @@ -143,7 +143,7 @@ csource_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_string_aux_argument (procedure, "prefixed-name", _("_Prefixed name"), diff --git a/plug-ins/common/file-dicom.c b/plug-ins/common/file-dicom.c index d1fb85b2fb..31039050f2 100644 --- a/plug-ins/common/file-dicom.c +++ b/plug-ins/common/file-dicom.c @@ -232,7 +232,7 @@ dicom_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/file-farbfeld.c b/plug-ins/common/file-farbfeld.c index 757a547b9c..97f5e74106 100644 --- a/plug-ins/common/file-farbfeld.c +++ b/plug-ins/common/file-farbfeld.c @@ -181,7 +181,7 @@ farbfeld_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c index bde85c508e..64c87f8548 100644 --- a/plug-ins/common/file-gbr.c +++ b/plug-ins/common/file-gbr.c @@ -152,7 +152,7 @@ gbr_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "spacing", _("Sp_acing"), diff --git a/plug-ins/common/file-gegl.c b/plug-ins/common/file-gegl.c index 3669596dc5..3919705c9c 100644 --- a/plug-ins/common/file-gegl.c +++ b/plug-ins/common/file-gegl.c @@ -238,7 +238,7 @@ goat_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); } } diff --git a/plug-ins/common/file-gif-export.c b/plug-ins/common/file-gif-export.c index 22c2687c30..51ca0ffdaf 100644 --- a/plug-ins/common/file-gif-export.c +++ b/plug-ins/common/file-gif-export.c @@ -189,7 +189,7 @@ gif_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA, - export_edit_options, NULL); + export_edit_options, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "interlace", _("_Interlace"), diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c index 1bf527ad45..fa7174f961 100644 --- a/plug-ins/common/file-gih.c +++ b/plug-ins/common/file-gih.c @@ -186,7 +186,7 @@ gih_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "spacing", _("Spacing (_percent)"), diff --git a/plug-ins/common/file-header.c b/plug-ins/common/file-header.c index 85002b7603..c2cfcca699 100644 --- a/plug-ins/common/file-header.c +++ b/plug-ins/common/file-header.c @@ -136,7 +136,7 @@ header_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/file-heif.c b/plug-ins/common/file-heif.c index 7717ca7d2b..3ff830e049 100644 --- a/plug-ins/common/file-heif.c +++ b/plug-ins/common/file-heif.c @@ -256,7 +256,7 @@ heif_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "quality", _("_Quality"), @@ -369,7 +369,7 @@ heif_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_file_procedure_set_priority (GIMP_FILE_PROCEDURE (procedure), 100); diff --git a/plug-ins/common/file-jpegxl.c b/plug-ins/common/file-jpegxl.c index 22822b9b0c..7acda7b13a 100644 --- a/plug-ins/common/file-jpegxl.c +++ b/plug-ins/common/file-jpegxl.c @@ -187,7 +187,7 @@ jpegxl_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "lossless", _("L_ossless"), diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c index 99e64e6e5f..b080bcc4cc 100644 --- a/plug-ins/common/file-mng.c +++ b/plug-ins/common/file-mng.c @@ -279,7 +279,7 @@ mng_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "interlaced", _("_Interlace"), diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c index ffea80b44e..da25e1f2d1 100644 --- a/plug-ins/common/file-pat.c +++ b/plug-ins/common/file-pat.c @@ -137,7 +137,7 @@ pat_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_string_argument (procedure, "description", _("_Description"), diff --git a/plug-ins/common/file-pcx.c b/plug-ins/common/file-pcx.c index 8701426508..31521a1e46 100644 --- a/plug-ins/common/file-pcx.c +++ b/plug-ins/common/file-pcx.c @@ -298,7 +298,7 @@ pcx_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/file-pdf-export.c b/plug-ins/common/file-pdf-export.c index 1a3e21a7c2..692cc6c9f7 100644 --- a/plug-ins/common/file-pdf-export.c +++ b/plug-ins/common/file-pdf-export.c @@ -346,7 +346,7 @@ pdf_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_LAYERS | GIMP_EXPORT_CAN_HANDLE_INDEXED, - export_edit_options, NULL); + export_edit_options, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "vectorize", _("Convert _bitmaps to vector graphics where possible"), @@ -541,7 +541,14 @@ pdf_export_multi (GimpProcedure *procedure, "images", &image_ids, NULL); - options = gimp_export_options_new (); + options = g_object_new (GIMP_TYPE_EXPORT_OPTIONS, + "capabilities", + GIMP_EXPORT_CAN_HANDLE_RGB | + GIMP_EXPORT_CAN_HANDLE_ALPHA | + GIMP_EXPORT_CAN_HANDLE_GRAY | + GIMP_EXPORT_CAN_HANDLE_LAYERS | + GIMP_EXPORT_CAN_HANDLE_INDEXED, + NULL); if (uri != NULL) { @@ -723,7 +730,7 @@ pdf_export_image (GimpProcedure *procedure, cairo_save (cr); if (! (gimp_export_options_get_image (options, - &image) == GIMP_EXPORT_EXPORT)) + &image) == GIMP_EXPORT_EXPORT)) { /* gimp_drawable_histogram() only works within the bounds of * the selection, which is a problem (see issue #2431). diff --git a/plug-ins/common/file-pix.c b/plug-ins/common/file-pix.c index 25c5893280..8d4c9f2fc7 100644 --- a/plug-ins/common/file-pix.c +++ b/plug-ins/common/file-pix.c @@ -221,7 +221,7 @@ pix_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c index 4dfab2f844..e03f8559aa 100644 --- a/plug-ins/common/file-png.c +++ b/plug-ins/common/file-png.c @@ -240,7 +240,7 @@ png_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "interlaced", _("_Interlacing (Adam7)"), diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c index c118e86cf7..a70d6089aa 100644 --- a/plug-ins/common/file-pnm.c +++ b/plug-ins/common/file-pnm.c @@ -372,7 +372,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "raw", _("_Data formatting"), @@ -415,7 +415,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_BITMAP, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "raw", _("_Data formatting"), @@ -458,7 +458,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_GRAY, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "raw", _("_Data formatting"), @@ -502,7 +502,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "raw", _("_Data formatting"), @@ -547,7 +547,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } else if (! strcmp (name, PFM_EXPORT_PROC)) { @@ -581,7 +581,7 @@ pnm_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY, - NULL, NULL); + NULL, NULL, NULL); } diff --git a/plug-ins/common/file-ps.c b/plug-ins/common/file-ps.c index 38e305f006..1a4259a89a 100644 --- a/plug-ins/common/file-ps.c +++ b/plug-ins/common/file-ps.c @@ -519,7 +519,7 @@ ps_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_double_argument (procedure, "width", _("_Width"), diff --git a/plug-ins/common/file-psp.c b/plug-ins/common/file-psp.c index 62eb2bd4b1..a337dbe351 100644 --- a/plug-ins/common/file-psp.c +++ b/plug-ins/common/file-psp.c @@ -720,7 +720,7 @@ psp_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "compression", _("_Data Compression"), diff --git a/plug-ins/common/file-raw-data.c b/plug-ins/common/file-raw-data.c index 18705289b7..fad529ba84 100644 --- a/plug-ins/common/file-raw-data.c +++ b/plug-ins/common/file-raw-data.c @@ -519,7 +519,7 @@ raw_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "planar-configuration", _("Planar configuration"), diff --git a/plug-ins/common/file-sunras.c b/plug-ins/common/file-sunras.c index 1ab960bf17..655ea0f5ed 100644 --- a/plug-ins/common/file-sunras.c +++ b/plug-ins/common/file-sunras.c @@ -324,7 +324,7 @@ sunras_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "rle", _("_Data Formatting"), diff --git a/plug-ins/common/file-tga.c b/plug-ins/common/file-tga.c index 58a24c54bb..01923eda17 100644 --- a/plug-ins/common/file-tga.c +++ b/plug-ins/common/file-tga.c @@ -308,7 +308,7 @@ tga_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "rle", _("_Use RLE compression"), diff --git a/plug-ins/common/file-xbm.c b/plug-ins/common/file-xbm.c index aca1d7826d..13f44d8fba 100644 --- a/plug-ins/common/file-xbm.c +++ b/plug-ins/common/file-xbm.c @@ -213,7 +213,7 @@ xbm_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_BITMAP | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "save-comment", _("_Write comment"), diff --git a/plug-ins/common/file-xmc.c b/plug-ins/common/file-xmc.c index 61edbb0dc0..d2d73a9858 100644 --- a/plug-ins/common/file-xmc.c +++ b/plug-ins/common/file-xmc.c @@ -370,7 +370,7 @@ xmc_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS | GIMP_EXPORT_NEEDS_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "hot-spot-x", _("Hot spot _X"), diff --git a/plug-ins/common/file-xpm.c b/plug-ins/common/file-xpm.c index 2576bf0256..cc1825cf7b 100644 --- a/plug-ins/common/file-xpm.c +++ b/plug-ins/common/file-xpm.c @@ -262,7 +262,7 @@ xpm_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "threshold", _("_Threshold"), diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c index 92c3333e42..7535516c3f 100644 --- a/plug-ins/common/file-xwd.c +++ b/plug-ins/common/file-xwd.c @@ -377,7 +377,7 @@ xwd_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/common/mail.c b/plug-ins/common/mail.c index 316d43641b..8b43dcd40e 100644 --- a/plug-ins/common/mail.c +++ b/plug-ins/common/mail.c @@ -290,7 +290,6 @@ send_image (GObject *config, gint32 run_mode) { GimpPDBStatusType status = GIMP_PDB_SUCCESS; - GimpExportOptions *options = NULL; gchar *ext; GFile *tmpfile; gchar *tmpname; @@ -330,9 +329,7 @@ send_image (GObject *config, tmpfile = gimp_temp_file (ext + 1); tmpname = g_file_get_path (tmpfile); - options = gimp_export_options_new (); - - if (! (gimp_file_save (run_mode, image, tmpfile, options) && + if (! (gimp_file_save (run_mode, image, tmpfile, NULL) && valid_file (tmpfile))) { goto error; diff --git a/plug-ins/file-bmp/bmp.c b/plug-ins/file-bmp/bmp.c index 0f887dbf58..b60d1c8509 100644 --- a/plug-ins/file-bmp/bmp.c +++ b/plug-ins/file-bmp/bmp.c @@ -200,7 +200,7 @@ bmp_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "use-rle", _("Ru_n-Length Encoded"), diff --git a/plug-ins/file-dds/dds.c b/plug-ins/file-dds/dds.c index 937a530831..51c171bbb6 100644 --- a/plug-ins/file-dds/dds.c +++ b/plug-ins/file-dds/dds.c @@ -190,7 +190,7 @@ dds_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_choice_argument (procedure, "compression-format", _("Compressio_n"), diff --git a/plug-ins/file-fits/fits.c b/plug-ins/file-fits/fits.c index 007cf14d78..3d3be15544 100644 --- a/plug-ins/file-fits/fits.c +++ b/plug-ins/file-fits/fits.c @@ -245,7 +245,7 @@ fits_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED, - NULL, NULL); + NULL, NULL, NULL); } return procedure; diff --git a/plug-ins/file-fli/fli-gimp.c b/plug-ins/file-fli/fli-gimp.c index e392110c0b..0729f67d83 100644 --- a/plug-ins/file-fli/fli-gimp.c +++ b/plug-ins/file-fli/fli-gimp.c @@ -240,7 +240,7 @@ fli_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "from-frame", _("_From frame"), diff --git a/plug-ins/file-icns/file-icns-export.c b/plug-ins/file-icns/file-icns-export.c index 48c7ad1d04..1f654cdd0d 100644 --- a/plug-ins/file-icns/file-icns-export.c +++ b/plug-ins/file-icns/file-icns-export.c @@ -465,7 +465,6 @@ icns_export_image (GFile *file, GimpImage *temp_image; GimpLayer *temp_layer; GFile *temp_file = NULL; - GimpExportOptions *options = gimp_export_options_new (); FILE *temp_fp; gint temp_size; gint macos_size; @@ -484,7 +483,6 @@ icns_export_image (GFile *file, "run-mode", GIMP_RUN_NONINTERACTIVE, "image", temp_image, "file", temp_file, - "options", options, "interlaced", FALSE, "compression", 9, "bkgd", FALSE, diff --git a/plug-ins/file-jpeg/jpeg.c b/plug-ins/file-jpeg/jpeg.c index dd031bb2db..fbf837156c 100644 --- a/plug-ins/file-jpeg/jpeg.c +++ b/plug-ins/file-jpeg/jpeg.c @@ -201,7 +201,7 @@ jpeg_create_procedure (GimpPlugIn *plug_in, gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), GIMP_EXPORT_CAN_HANDLE_RGB | GIMP_EXPORT_CAN_HANDLE_GRAY, - NULL, NULL); + NULL, NULL, NULL); /* See bugs #63610 and #61088 for a discussion about the quality * settings diff --git a/plug-ins/file-psd/psd.c b/plug-ins/file-psd/psd.c index 42b782572a..c6ec53e847 100644 --- a/plug-ins/file-psd/psd.c +++ b/plug-ins/file-psd/psd.c @@ -241,7 +241,7 @@ psd_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_ALPHA | GIMP_EXPORT_CAN_HANDLE_LAYERS | GIMP_EXPORT_CAN_HANDLE_LAYER_MASKS, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "clippingpath", _("Assign a Clipping _Path"), diff --git a/plug-ins/file-sgi/sgi.c b/plug-ins/file-sgi/sgi.c index 44f547aa25..8a2c198dd5 100644 --- a/plug-ins/file-sgi/sgi.c +++ b/plug-ins/file-sgi/sgi.c @@ -194,7 +194,7 @@ sgi_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - NULL, NULL); + NULL, NULL, NULL); gimp_procedure_add_int_argument (procedure, "compression", _("Compression _type"), diff --git a/plug-ins/file-tiff/file-tiff.c b/plug-ins/file-tiff/file-tiff.c index d7cc27ca0d..c215b6330b 100644 --- a/plug-ins/file-tiff/file-tiff.c +++ b/plug-ins/file-tiff/file-tiff.c @@ -232,7 +232,7 @@ tiff_create_procedure (GimpPlugIn *plug_in, /* TIFF capabilities are so dependent on export settings, we can't assign * defaults until we know how the user wants to export it */ gimp_export_procedure_set_capabilities (GIMP_EXPORT_PROCEDURE (procedure), - 0, export_edit_options, NULL); + 0, export_edit_options, NULL, NULL); gimp_procedure_add_boolean_argument (procedure, "bigtiff", _("Export in _BigTIFF variant file format"), diff --git a/plug-ins/file-webp/file-webp.c b/plug-ins/file-webp/file-webp.c index 03dbe87fd7..6e1b2bf8b3 100644 --- a/plug-ins/file-webp/file-webp.c +++ b/plug-ins/file-webp/file-webp.c @@ -175,7 +175,7 @@ webp_create_procedure (GimpPlugIn *plug_in, GIMP_EXPORT_CAN_HANDLE_GRAY | GIMP_EXPORT_CAN_HANDLE_INDEXED | GIMP_EXPORT_CAN_HANDLE_ALPHA, - export_edit_options, NULL); + export_edit_options, NULL, NULL); gimp_procedure_add_int_argument (procedure, "preset", _("Source _type"),