negate

[ XITE Reference Manual | XITE home ]

Name

negate - negate a band

Syntax

 #include <xite/negate.h>

 int negate( IBAND b1, IBAND b2 );

Description

Negates b1 into b2. Only largest common rectangle is negated. Accepts all pixel types. For pixel types including negative values, the result is
 output = -input
For pixel types NOT including negative values, the result is
 output = MAX - input
where MAX is the largest value of the actual pixel type. Both bands must have the same pixel type. Identical in- and out- parameters are legal.

Return value

 0 => ok
 1 => Bands have unknown pixel type
 2 => Bands have different pixel types

Author

Tor L|nnestad, BLAB, IfI, UiO

Id

$Id: negate.c,v 1.26 1997/01/29 10:43:50 svein Exp $