magickGetImageRegion method

Future<MagickWand?> magickGetImageRegion({
  1. required int width,
  2. required int height,
  3. required int x,
  4. required int y,
})

MagickGetImageRegion() extracts a region of the image and returns it as a new wand.

Don't forget to call destroyMagickWand on the returned MagickWand when done.

This method runs inside an isolate different from the main isolate.

  • width: the region width.
  • height: the region height.
  • x: the region x offset.
  • y: the region y offset.

Implementation

Future<MagickWand?> magickGetImageRegion({
  required int width,
  required int height,
  required int x,
  required int y,
}) async =>
    MagickWand._fromAddress(
      await _magickCompute(
        _magickGetImageRegion,
        _MagickGetImageRegionParams(
          _wandPtr.address,
          width,
          height,
          x,
          y,
        ),
      ),
    );