Methods to apply mathematic or boolean operators to pixels.
MagickPassFail QuantumOperatorImage( Image *image, ChannelType channel, QuantumOperator operator, double rvalue );
QuantumOperatorImage() performs the requested arithmetic, bitwise-logical, or value operation on the selected channels of the entire image. The AllChannels channel option operates on all color channels whereas the GrayChannel channel option treats the color channels as a grayscale intensity.
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 );
The image.
Channel to operate on (RedChannel, CyanChannel, GreenChannel, MagentaChannel, BlueChannel, YellowChannel, OpacityChannel, BlackChannel, MatteChannel, AllChannels, GrayChannel). The AllChannels type only updates color channels. The GrayChannel type treats the color channels as if they represent an intensity.
Operator to use (AddQuantumOp, AndQuantumOp, AssignQuantumOp, DepthQuantumOp, DivideQuantumOp, GammaQuantumOp, LShiftQuantumOp, MultiplyQuantumOp, NegateQuantumOp, NoiseGaussianQuantumOp, NoiseImpulseQuantumOp, NoiseLaplacianQuantumOp, NoiseMultiplicativeQuantumOp, NoisePoissonQuantumOp, NoiseRandomQuantumOp, NoiseUniformQuantumOp, OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp, ThresholdBlackQuantumOp, ThresholdQuantumOp, ThresholdWhiteQuantumOp, ThresholdBlackNegateQuantumOp, ThresholdWhiteNegateQuantumOp, XorQuantumOp).
Operator argument.
Updated with error description.
MagickPassFail QuantumOperatorRegionImage( Image *image, long x, long y, unsigned long columns, unsigned long rows, ChannelType channel, QuantumOperator quantum_operator, double rvalue );
QuantumOperatorRegionImage() performs the requested arithmetic, bitwise-logical, or value operation on the selected channels of the image over the specified region. The AllChannels channel option operates on all color channels whereas the GrayChannel channel option treats the color channels as a grayscale intensity.
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 );
The image.
Channel to operate on (RedChannel, CyanChannel, GreenChannel, MagentaChannel, BlueChannel, YellowChannel, OpacityChannel, BlackChannel, MatteChannel, AllChannels, GrayChannel). The AllChannels type only updates color channels. The GrayChannel type treats the color channels as if they represent an intensity.
Ordinate of left row of region.
Orginate of top column of region.
Width of region.
Height of region.
Operator to use (AddQuantumOp,AndQuantumOp, AssignQuantumOp, DepthQuantumOp, DivideQuantumOp, GammaQuantumOp, LShiftQuantumOp, MultiplyQuantumOp, NegateQuantumOp, NoiseGaussianQuantumOp, NoiseImpulseQuantumOp, NoiseLaplacianQuantumOp, NoiseMultiplicativeQuantumOp, NoisePoissonQuantumOp, NoiseRandomQuantumOp, NoiseUniformQuantumOp, OrQuantumOp, RShiftQuantumOp, SubtractQuantumOp, ThresholdBlackQuantumOp, ThresholdQuantumOp, ThresholdWhiteQuantumOp, XorQuantumOp).
Operator argument.
Updated with error description.
Copyright © GraphicsMagick Group 2002 - 2023