scale
[ XITE Reference Manual | XITE home ]
Name
scale - linear scaling of pixel values
Syntax
#include <xite/arithmetic.h>
int scale( IBAND input, IBAND output,
double Scale, double offset );
Description
scale scales the input band into the output band:
output(x,y) = Scale*input(x,y) + offset
Only the largest rectangle common to the two bands
is scaled.
Accepts all pixeltypes except the sub-byte types. input and
output must have the same pixeltype, otherwise use
convertBiff.
If the result is outside the domain of the actual
pixeltype, the nearest possible value is returned.
Identical arguments for input and output are allowed.
Return value
0 => ok
1 => bad or different pixel types
See also
convertBand(3)
Author
Tor Lønnestad, BLAB, Ifi, UiO
Id
$Id: scale.c,v 1.36 1997/05/27 12:36:42 svein Exp $