im_subtract - subtracts two images
int im_subtract(in1, in2, out)
IMAGE *in1, *in2, *out;
This functions calculates in1 - in2 and writes the result in the image
descriptor out. Input images in1 and in2 should have the same channels
and the same sizes; however they can be of different types. Only the
history of the image descriptor pointed by in1 is copied to out.
The type of the output is given by the table:
in1 - uchar char ushort short uint int
uchar | short short short short int int
char | short short short short int int
ushort | short short short short int int
short | short short short short int int
uint | int int int int int int
int | int int int int int int
The result of this operation cannot be unsigned. For float types, the
refult is float unless one of the inputs is double, in which case the
result is double. For complex types the result is FMTCOMPLEX, unless
one of the inputs is FMTDPCOMPLEX, in which case the output is
None of the functions checks the result for over/underflow.
All functions return 0 on success and -1 on error.
im_add(3), im_lintra(3), im_multiply(3).
National Gallery, 1995
24 April 1991 SUBTRACTION(3)