operator - Methods to apply mathematic or boolean operators to pixels.
MagickPassFail QuantumOperatorImage( Image *image, ChannelType channel, QuantumOperator operator, double rvalue );
MagickPassFail QuantumOperatorRegionImage( Image *image, long x, long y, unsigned long columns, unsigned long rows, ChannelType channel, QuantumOperator quantum_operator, double rvalue );
QuantumOperatorImage() performs the requested integer arithmetic operation on the selected channels of the entire image.
These operations are on the DirectClass pixels of the image and do not update pixel indexes or colormap.
The format of the QuantumOperatorImage method is:
MagickPassFail QuantumOperatorImage ( Image *image, ChannelType channel, QuantumOperator operator, double rvalue );
A description of each parameter follows:
The image.
Channel to operate on.
arithmetic or bitwise operator to use (AddQuantumOp, AndQuantumOp, AssignQuantumOp, DivideQuantumOp, LShiftQuantumOp, MultiplyQuantumOp, OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp, ThresholdQuantumOp, XorQuantumOp).
Operator argument.
Updated with error description.
QuantumOperatorRegionImage() performs the requested arithmetic or logical operation on the selected channels of the image over the specified region.
These operations are on the DirectClass pixels of the image and do not update pixel indexes or colormap.
The format of the QuantumOperatorRegionImage method is:
MagickPassFail QuantumOperatorRegionImage ( Image *image, long x, long y, unsigned long columns, unsigned long rows, ChannelType channel, QuantumOperator quantum_operator, double rvalue );
A description of each parameter follows:
The image.
Channel to operate on. The AllChannels type only updates color channels.
Ordinate of left row of region.
Orginate of top column of region.
Width of region.
Height of region.
arithmetic or bitwise operator to use (AddQuantumOp, AndQuantumOp, DivideQuantumOp, LShiftQuantumOp, MultiplyQuantumOp, OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp, XorQuantumOp).
Operator argument.
Updated with error description.