Gimp.RunExportFunc

function onRunExportFunc(procedure: Gimp.Procedure, run_mode: Gimp.RunMode, image: Gimp.Image, file: Gio.File, options: Gimp.ExportOptions, metadata: Gimp.Metadata, config: Gimp.ProcedureConfig): Gimp.ValueArray {
}
  

The export function is run during the lifetime of the GIMP session, each time a plug-in export procedure is called.

If a MimeType was passed in Gimp.ExportProcedure.new, then metadata will be non-null and can be tweaked by the run() function if needed. Otherwise you can let it as-is and it will be stored back into the exported file according to rules on metadata export shared across formats.

Since 3.0

procedure

the Gimp.Procedure that runs.

run_mode

the Gimp.RunMode.

image

the image to export.

file

the Gio.File to export to.

options

the Gimp.ExportOptions settings.

metadata

metadata object prepared for the mimetype passed in Gimp.FileProcedure.prototype.set_mime_types if export_metadata argument was set in Gimp.ExportProcedure.new.

config

the procedure's remaining arguments.

Returns

the procedure's return values.