# Gimp.RunLoadFunc

    @accepts(Gimp.Procedure, Gimp.RunMode, Gio.File, Gimp.Metadata, Gimp.MetadataLoadFlags, Gimp.ProcedureConfig, gpointer)
    @returns(Gimp.ValueArray)
    def on_RunLoadFunc(procedure, run_mode, file, metadata, flags, config, run_data):

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

You are expected to read file and create a [class@Gimp.Image] out of its data. This image will be the first return value. metadata will be filled from metadata from file if our infrastructure supports this format. You may tweak this object, for instance adding metadata specific to the format. You can also edit flags if you need to filter out some specific common fields. For instance, it is customary to remove a colorspace field with [flags@MetadataLoadFlags] when a profile was added.

Since 3.0

procedure

  the [class@Gimp.Procedure] that runs.

run_mode

  the [enum@RunMode].

file

  the [iface@Gio.File] to load from.

metadata

  the [class@Gimp.Metadata] which will be added to the new image.

flags

  flags to filter which metadata will be added..

config

  the procedure's remaining arguments.

run_data

  the run_data given in Gimp.LoadProcedure.new.

Returns

  the procedure's return values.