# Gimp.ExportProcedure.new

    function new(plug_in: Gimp.PlugIn, name: String, proc_type: Gimp.PDBProcType, export_metadata: Boolean, run_func: Gimp.RunExportFunc): Gimp.Procedure {
        // Gjs wrapper for gimp_export_procedure_new()
    }

Creates a new export procedure named name which will call run_func when invoked.

See Gimp.Procedure.new for information about proc_type.

Gimp.ExportProcedure is a Gimp.Procedure subclass that makes it easier to write file export procedures.

It automatically adds the standard

(Gimp.RunMode, Gimp.Image, Gio.File, Gimp.ExportOptions)

arguments of an export procedure. It is possible to add additional arguments.

When invoked via Gimp.Procedure.prototype.run, it unpacks these standard arguments and calls run_func which is a Gimp.RunExportFunc. The Gimp.ProcedureConfig of Gimp.RunExportFunc only contains additionally added arguments.

If export_metadata is TRUE, then the class will also handle the metadata export if the format is supported by our backend. This requires you to also set appropriate MimeType with Gimp.FileProcedure.prototype.set_mime_types.

Since 3.0

plug_in

  a Gimp.PlugIn.

name

  the new procedure's name.

proc_type

  the new procedure's Gimp.PDBProcType.

export_metadata

  whether GIMP should handle metadata exporting.

run_func

  the run function for the new procedure.

Returns

  a new Gimp.Procedure.