Callbacks

ArgumentClassMapFn (object_class, pspec, argument_class, a, b)

ArgumentMapFn (object, pspec, argument_class, argument_instance, a, b)

CallbackFn (a, b)

ClassMapFn (cls, a)

GenerateFn (out, seq, a, b, stop)

ImageMapFn (image, name, value, a)

InterpolateMethod (interpolate, out, in_, x, y)

ObjectSetArguments (object, a, b)

OperationBuildFn (object)

RegionWrite (region, area, a)

SListFold2Fn (item, a, b, c)

SListMap2Fn (item, a, b)

SListMap4Fn (item, a, b, c, d)

SinkNotify (im, rect, a)

StartFn (out, a, b)

StopFn (seq, a, b)

ThreadpoolAllocateFn (state, a, stop)

ThreadpoolProgressFn (a)

ThreadpoolWorkFn (state, a)

TypeMap2Fn (type, a, b)

TypeMapFn (type, a)

Details

Vips.ArgumentClassMapFn(object_class, pspec, argument_class, a, b)
Parameters:
Return type:

object or None

Vips.ArgumentMapFn(object, pspec, argument_class, argument_instance, a, b)
Parameters:
Return type:

object or None

Vips.CallbackFn(a, b)
Parameters:
Return type:

int

Vips.ClassMapFn(cls, a)
Parameters:
Return type:

object or None

Vips.GenerateFn(out, seq, a, b, stop)
Parameters:
Returns:

0 on success, -1 on error.

Return type:

int

Fill out->valid with pixels. seq contains per-thread state, such as the input regions. Set stop to TRUE to stop processing.

::: seealso [method`Image`.generate], [func`stop_many`].

Vips.ImageMapFn(image, name, value, a)
Parameters:
Return type:

object or None

Vips.InterpolateMethod(interpolate, out, in_, x, y)
Parameters:
  • interpolate (Vips.Interpolate) – the interpolator

  • out (object or None) – write the interpolated pixel here

  • in (Vips.Region) – read source pixels from here

  • x (float) – interpolate value at this position

  • y (float) – interpolate value at this position

An interpolation function. It should read source pixels from in with [funcREGION_ADDR], it can look left and up from (x, y) by window_offset pixels and it can access pixels in a window of size window_size.

The interpolated value should be written to the pixel pointed to by out.

::: seealso [struct`InterpolateClass`].

Vips.ObjectSetArguments(object, a, b)
Parameters:
Return type:

object or None

Vips.OperationBuildFn(object)
Parameters:

object (Vips.Object) –

Return type:

bool

Vips.RegionWrite(region, area, a)
Parameters:
Returns:

0 on success, -1 on error.

Return type:

int

The function should write the pixels in area from region. a is the value passed into [method`Image`.sink_disc].

::: seealso [method`Image`.sink_disc].

Vips.SListFold2Fn(item, a, b, c)
Parameters:
Return type:

object or None

Vips.SListMap2Fn(item, a, b)
Parameters:
Return type:

object or None

Vips.SListMap4Fn(item, a, b, c, d)
Parameters:
Return type:

object or None

Vips.SinkNotify(im, rect, a)
Parameters:
Vips.StartFn(out, a, b)
Parameters:
Returns:

a new sequence value

Return type:

object or None

Start a new processing sequence for this generate function. This allocates per-thread state, such as an input region.

::: seealso [func`start_one`], [func`start_many`].

Vips.StopFn(seq, a, b)
Parameters:
Returns:

0 on success, -1 on error.

Return type:

int

Stop a processing sequence. This frees per-thread state, such as an input region.

::: seealso [func`stop_one`], [func`stop_many`].

Vips.ThreadpoolAllocateFn(state, a, stop)
Parameters:
Returns:

0 on success, or -1 on error

Return type:

int

This function is called to allocate a new work unit for the thread. It is always single-threaded, so it can modify per-pool state (such as a counter).

It should set stop to TRUE to indicate that no work could be allocated because the job is done.

::: seealso [func`threadpool_run`].

Vips.ThreadpoolProgressFn(a)
Parameters:

a (object or None) – client data

Returns:

0 on success, or -1 on error

Return type:

int

This function is called by the main thread once for every work unit processed. It can be used to give the user progress feedback.

::: seealso [func`threadpool_run`].

Vips.ThreadpoolWorkFn(state, a)
Parameters:
Returns:

0 on success, or -1 on error

Return type:

int

This function is called to process a work unit. Many copies of this can run at once, so it should not write to the per-pool state. It can write to per-thread state.

::: seealso [func`threadpool_run`].

Vips.TypeMap2Fn(type, a, b)
Parameters:
Return type:

object or None

Vips.TypeMapFn(type, a)
Parameters:
Return type:

object or None