1DIVISION(3)                Library Functions Manual                DIVISION(3)
2
3
4

NAME

6       im_divide - divide two images
7

SYNOPSIS

9       #include <vips/vips.h>
10
11       int im_divide(in1, in2, out)
12       IMAGE *in1, *in2, *out;
13
14

DESCRIPTION

16       im_divide(3)  divides two images. The result is float except if one (or
17       both) input is double.  In the latter case the  result  is  double.  If
18       either input is complex, the result is complex. If either input is dou‐
19       ble complex, the output is double complex.
20
21       Input images in1 and in2 should have the same  channels  and  the  same
22       sizes, however they can be of different types.  Only the history of the
23       image descriptor pointed by in1 is copied to out.
24
25       For complex input pels (x1,y1) and (x2,y2), im_divide(3) writes
26         ((x1*x2 + y1*y2)/(x2*x2 + y2*y2), (y1*x2 - x1*y2)/(x2*x2 + y2*y2)).
27
28

BUGS

30       The function does not check the result for over/underflow.
31

RETURN VALUE

33       The function returns 0 on success and -1 on error.
34

SEE ALSO

36       im_remainder(3),    im_multiply(3),    im_subtract(3),    im_lintra(3),
37       im_add(3).
38
40       National Gallery, 1995
41
42
43
44                                 24 April 1991                     DIVISION(3)
Impressum