XVista manual page

NAME

add - add image files

SYNOPSIS

add file1 [file2] [filen] [const=] [box=] [norm] [outfile=]

DESCRIPTION

This routine computes the sum of the data in file1 and (if specified) file2, or more. A constant offset can be specified. The computed sum is stored in file1.

The norm flag causes the sum to be divided by the number of files. The sum is carried as a 32 bit integer, so clipping should not be a problem until the file is written.

If a box is specified, then the operations are only carried out over the box.

The number of rows and columns in file1 must equal to those in file2.

The result is placed in file1 unless the outfile= option is specified.

EXAMPLE

add alflyr gamma - adds the file gamma to the file alflyr

add alflyr const=45 - adds 45 to the file alflyr

add gamma1 gamma2 gamma3 norm -adds files gamma2 and gamma3 to gamma1 and divides the result by 3.

SEE ALSO

sub, mul, div