Movatterモバイル変換


[0]ホーム

URL:


Method

VipsImagemath2_const

Declaration[src]

intvips_math2_const(VipsImage*in,VipsImage**out,VipsOperationMath2math2,constdouble*c,intn,...)

Description[src]

This operation calculates various 2-ary maths operations on an image andan array of constants and writes the result toout.The image may have anynon-complex format.out is float except in the case thatinis double, in which caseout is also double.

It detects division by zero, setting those pixels to zero in the output.Beware: it does this silently!

If the array of constants has just one element, that constant is used forall image bands. If the array has more than one element and they havethe same number of elements as there are bands in the image, thenone array element is used for each band. If the arrays have more than oneelement and the image only has a single band, the result is a many-bandimage where each band corresponds to one array element.

This method is not directly available to language bindings.

Parameters

out

Type: VipsImage

Output image.

The argument will be set by the function.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
math2

Type: VipsOperationMath2

Math operation to perform.

c

Type: An array of double

Array of constants.

The length of the array is specified in then argument.
The data is owned by the caller of the method.
n

Type: int

Number of constants inc.

...

Type: 

NULL-terminated list of optional named arguments.

Return value

Type: int

0 on success, -1 on error.


[8]ページ先頭

©2009-2025 Movatter.jp