magickSparseColorImage method

Future<bool> magickSparseColorImage({
  1. required SparseColorMethod method,
  2. required Float64List arguments,
})

MagickSparseColorImage() given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods.

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

  • method: the method of image sparseion. ArcSparseColorion will always ignore source image offset, and always 'bestfit' the destination image with the top left corner offset relative to the polar mapping center.

Bilinear has no simple inverse mapping so will not allow 'bestfit' style of image sparseion.

Affine, Perspective, and Bilinear, will do least squares fitting of the distortion when more than the minimum number of control point pairs are provided.

Perspective, and Bilinear, will fall back to a Affine sparseion when less than 4 control point pairs are provided. While Affine sparseions will let you use any number of control point pairs, that is Zero pairs is a No-Op (viewport only) distortion, one pair is a translation and two pairs of control points will do a scale-rotate-translate, without any shearing.

  • arguments: the arguments for this sparseion method.

Implementation

Future<bool> magickSparseColorImage({
  required SparseColorMethod method,
  required Float64List arguments,
}) async =>
    await _magickCompute(
      _magickSparseColorImage,
      _MagickSparseColorImageParams(
        _wandPtr.address,
        method,
        arguments,
      ),
    );