magickChannelFxImage method
magickChannelFxImage()
applies a channel expression to the specified
image. The expression consists of one or more channels, either mnemonic
or numeric (e.g. red, 1), separated by actions as follows:
<=> exchange two channels (e.g. red<=>blue) => transfer a channel to
another (e.g. red=>green) , separate channel operations (e.g. red, green)
| read channels from next input image (e.g. red | green) ; write channels
to next output image (e.g. red; green; blue) A channel without a operation
symbol implies extract. For example, to create 3 grayscale images from the
red, green, and blue channels of an image, use: -channel-fx "red; green;
blue".
Don't forget to call destroyMagickWand on the returned MagickWand when done.
This method runs inside an isolate different from the main isolate.
expression
: the expression.
Sending invalid parameters will cause an invalid state and may crash the app, so you should make sure to validate the input to this method.
Implementation
Future<MagickWand?> magickChannelFxImage(String expression) async =>
MagickWand._fromAddress(
await _magickCompute(
_magickChannelFxImage,
_MagickChannelFxImageParams(_wandPtr.address, expression),
),
);