Gimp.SaveProcedure.new
function new(plug_in: Gimp.PlugIn, name: String, proc_type: Gimp.PDBProcType, export_metadata: Boolean, run_func: Gimp.RunSaveFunc): Gimp.Procedure {
// Gjs wrapper for gimp_save_procedure_new()
}
Creates a new save procedure named name which will call run_func when invoked.
See Gimp.Procedure.new for information about proc_type.
Gimp.SaveProcedure is a Gimp.Procedure subclass that makes it easier to write file save procedures.
It automatically adds the standard
(Gimp.RunMode, Gimp.Image, Gimp.Drawable, Gio.File)
arguments of a save 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.RunSaveFunc. The Gimp.ProcedureConfig of Gimp.RunSaveFunc 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.