magickOpaquePaintImage method

Future<bool> magickOpaquePaintImage({
  1. required PixelWand target,
  2. required PixelWand fill,
  3. required double fuzz,
  4. required bool invert,
})

MagickOpaquePaintImage() changes any pixel that matches color with the color defined by fill.

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

  • target: Change this target color to the fill color within the image.
  • fill: the fill pixel wand.
  • fuzz: By default target must match a particular pixel color exactly. However, in many cases two colors may differ by a small amount. The fuzz member of image defines how much tolerance is acceptable to consider two colors as the same. For example, set fuzz to 10 and the color red at intensities of 100 and 102 respectively are now interpreted as the same color for the purposes of the floodfill.
  • invert: paint any pixel that does not match the target color.

Implementation

Future<bool> magickOpaquePaintImage({
  required PixelWand target,
  required PixelWand fill,
  required double fuzz,
  required bool invert,
}) async =>
    await _magickCompute(
      _magickOpaquePaintImage,
      _MagickOpaquePaintImageParams(
        _wandPtr.address,
        target._wandPtr.address,
        fill._wandPtr.address,
        fuzz,
        invert,
      ),
    );