Gimp.RunSaveFunc

@accepts(Gimp.Procedure, Gimp.RunMode, Gimp.Image, int, [Gimp.Drawable], Gio.File, Gimp.Metadata, Gimp.ProcedureConfig, gpointer)
@returns(Gimp.ValueArray)
def on_RunSaveFunc(procedure, run_mode, image, n_drawables, drawables, file, metadata, config, run_data):
  

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

If a MimeType was passed in Gimp.SaveProcedure.new, then metadata will be non-None 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 save.

n_drawables

the number of drawables to save.

drawables

the drawables to save.

file

the Gio.File to save to.

metadata

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

config

the procedure's remaining arguments.

run_data

the run_data given in Gimp.SaveProcedure.new.

Returns

the procedure's return values.