Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Vips.ArgumentClassMapFn(object_class, pspec, argument_class, a, b)¶
- Parameters:
object_class (
Vips.ObjectClass) –pspec (
GObject.ParamSpec) –argument_class (
Vips.ArgumentClass) –
- Return type:
- Vips.ArgumentMapFn(object, pspec, argument_class, argument_instance, a, b)¶
- Parameters:
object (
Vips.Object) –pspec (
GObject.ParamSpec) –argument_class (
Vips.ArgumentClass) –argument_instance (
Vips.ArgumentInstance) –
- Return type:
- Vips.ClassMapFn(cls, a)¶
- Parameters:
cls (
Vips.ObjectClass) –
- Return type:
- Vips.GenerateFn(out, seq, a, b, stop)¶
- Parameters:
- Returns:
0 on success, -1 on error.
- Return type:
Fill out->valid with pixels. seq contains per-thread state, such as the input regions. Set stop to
TRUEto stop processing.::: seealso [method`Image`.generate], [func`stop_many`].
- Vips.ImageMapFn(image, name, value, a)¶
- Parameters:
image (
Vips.Image) –name (
str) –value (
GObject.Value) –
- Return type:
- Vips.InterpolateMethod(interpolate, out, in_, x, y)¶
- Parameters:
interpolate (
Vips.Interpolate) – the interpolatorin (
Vips.Region) – read source pixels from herex (
float) – interpolate value at this positiony (
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)¶
- Vips.OperationBuildFn(object)¶
- Parameters:
object (
Vips.Object) –- Return type:
- Vips.RegionWrite(region, area, a)¶
- Parameters:
region (
Vips.Region) – get pixels from herearea (
Vips.Rect) – area to write
- Returns:
0 on success, -1 on error.
- Return type:
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)¶
- Vips.SListMap2Fn(item, a, b)¶
- Vips.SListMap4Fn(item, a, b, c, d)¶
- Vips.SinkNotify(im, rect, a)¶
- Parameters:
im (
Vips.Image) –rect (
Vips.Rect) –
- Vips.StartFn(out, a, b)¶
- Parameters:
out (
Vips.Image) – image being calculated
- Returns:
a new sequence value
- Return type:
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:
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:
state (
Vips.ThreadState) – per-thread statestop (
bool) – set this to signal end of computation
- Returns:
0 on success, or -1 on error
- Return type:
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
TRUEto indicate that no work could be allocated because the job is done.::: seealso [func`threadpool_run`].
- Vips.ThreadpoolProgressFn(a)¶
-
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:
state (
Vips.ThreadState) – per-thread state
- Returns:
0 on success, or -1 on error
- Return type:
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)¶