# Gimp.RunVectorLoadFunc

    @accepts(Gimp.Procedure, Gimp.RunMode, Gio.File, int, int, Gimp.VectorLoadData, Gimp.Metadata, Gimp.MetadataLoadFlags, Gimp.ProcedureConfig, gpointer, gpointer)
    @returns(Gimp.ValueArray)
    def on_RunVectorLoadFunc(procedure, run_mode, file, width, height, extracted_data, metadata, flags, config, data_from_extract, 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.

Regarding returned image dimensions:

1. If width or height is 0 or negative, the actual value will be computed so that ratio is preserved. If @prefer_native_dimension is False, at least one of the 2 dimensions should be strictly positive. 2. If @preserve_ratio is True, then width and height are considered as a max size in their respective dimension. I.e. that the resulting image will be at most @widthxheight while preserving original ratio. @preserve_ratio is implied when any of the dimension is 0 or negative. 3. If @prefer_native_dimension is True, and if the image has some kind of native size (if the format has such metadata or it can be computed), it will be used rather than @widthxheight. Note that if both dimensions are 0 or negative, even if @prefer_native_dimension is TRUE yet the procedure cannot determine native dimensions, then maybe a dialog could be popped up (if implemented), unless the run_mode is [enum@Gimp.RunMode.NONINTERACTIVE].

Since 3.0

procedure

  the [class@Gimp.Procedure] that runs.

run_mode

  the [enum@RunMode].

file

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

width

  the desired width in pixel for the created image.

height

  the desired height in pixel for the created image.

extracted_data

  dimensions returned by [callback@ExtractVectorFunc].

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.

data_from_extract

  @data_for_run returned by [callback@ExtractVectorFunc].

run_data

  run_data given in Gimp.VectorLoadProcedure.new.

Returns

  the procedure's return values.