c_pxmul - Multiplies two input arrays

SYNTAX

#include "worgen.h"

FUNCTION c_pxmul (ns, in1, in2, out, scale, offset, dtype)

     long                   *ns;
     unsigned char          *in1;
     unsigned char          *in2;
     unsigned char          *out;
     float                  *scale;
     float                  *offset;
     long                   *dtype;

PARAMETERS

ns (input, integer)

The number of samples to be multiplied.

in1 (input, 'dtype')

An array of pixel values to be multiplied.

in2 (input, 'dtype')

An array of pixel values to be multiplied.

out (output, 'dtype')

An array created by multiplying, scaling and offsetting the two input arrays.

     out = (in1 x in2) x scale + offset

scale (input, real)

The scale factor to be applied.

offset (input, real)

The offset to be applied.

dtype (input, integer)

An integer value that represents the type of data to be multiplied. The output array is of the same data type as the input arrays. Legal values include:

     = EBYTE(1):     unsigned byte data
     = EWORD(2):     signed two byte data
     = ELONG(3):     signed four byte data
     = EREAL(4):     four byte floating point data

DESCRIPTION

The c_pxmul() call is used to create an output array out by multiplying, scaling, and offsetting the values of ns samples of two input arrays in1 and in2 of type dtype.

RETURN VALUE

c_pxmul() returns

     E_SUCC   -->  successful completion
     TOOBIG   -->  exceeded upper limit of data type
     TOOSMALL -->  exceeded lower limit of data type
     TYPERR   -->  invalid data type specified