libvips/man/im_subtract.3

42 lines
1.4 KiB
Groff
Raw Normal View History

2007-08-29 18:23:50 +02:00
.TH SUBTRACTION 3 "24 April 1991"
.SH NAME
im_subtract \- subtracts two images
.SH SYNOPSIS
#include <vips/vips.h>
int im_subtract(in1, in2, out)
.br
IMAGE *in1, *in2, *out;
.SH DESCRIPTION
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
-------|-----------------------------------------
in2 |
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 FMTDPCOMPLEX.
.SH BUGS
None of the functions checks the result for over/underflow.
.SH RETURN VALUE
All functions return 0 on success and -1 on error.
.SH SEE ALSO
im_add(3), im_lintra(3), im_multiply(3).
.SH COPYRIGHT
National Gallery, 1995