Description

Divide 1 image by another, an image by a number, or a number by an image.

Return Type

A McImage object.  

The resulting McImage.

Syntax

object.Div (vOperand2, [vOperand1])

The Div Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McOperations.
vOperand2Required. A Variant value.

Second operand of the operation: McImage, or number (array for color images).

vOperand1Optional. A Variant value.

Optional first image operand (operator applies to parent image when parameter is omitted), or a number (an array for color images).

Remarks

A conversion is performed on vOperand2 so that it has the same type as the source image. The conversion rules are defined by the value of the Conversion property.

The result of the operation is multiplied by Offset to produce the final result:

Parent image [or vOperand1] / vOperand2 * Offset

which is stored in the parent image or vOperand1 if there is no parent.

Exceptions

The exception mceINVALIDARG (E_INVALIDARG) will be thrown if one of the parameters is invalid.