magickOptimizeImageLayers method
MagickOptimizeImageLayers() compares each image the GIF disposed forms of the previous image in the sequence. From this it attempts to select the smallest cropped image to replace each frame, while preserving the results of the animation.
This method runs inside an isolate different from the main isolate.
Don't forget to call destroyMagickWand on the returned MagickWand when done.
Implementation
Future<MagickWand?> magickOptimizeImageLayers() async =>
MagickWand._fromAddress(
await _magickCompute(
_magickOptimizeImageLayers,
_wandPtr.address,
),
);