magickMergeImageLayers method
MagickMergeImageLayers() composes all the image layers from the current given image onward to produce a single image of the merged layers. The inital canvas's size depends on the given LayerMethod, and is initialized using the first images background color. The images are then composited onto that image in sequence using the given composition that has been assigned to each individual image.
This method runs inside an isolate different from the main isolate.
Don't forget to call destroyMagickWand on the returned MagickWand when done.
method
: the method of selecting the size of the initial canvas.
Implementation
Future<MagickWand?> magickMergeImageLayers(LayerMethod method) async =>
MagickWand._fromAddress(
await _magickCompute(
_magickMergeImageLayers,
_MagickMergeImageLayersParams(
_wandPtr.address,
method,
),
),
);