magickCompareImages method

Future<MagickWand?> magickCompareImages({
  1. required MagickWand reference,
  2. required MetricType metric,
  3. required Float64List distortion,
})

Compares an image to a reconstructed image and returns the specified difference image.

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

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

  • reference : the reference wand.
  • metric : the metric.
  • distortion : the computed distortion between the images.

Implementation

Future<MagickWand?> magickCompareImages({
  required MagickWand reference,
  required MetricType metric,
  required Float64List distortion,
}) async =>
    MagickWand._fromAddress(
      await _magickCompute(
        _magickCompareImages,
        _MagickCompareImagesParams(
          _wandPtr.address,
          reference._wandPtr.address,
          metric.index,
          distortion,
        ),
      ),
    );