magickTransparentPaintImage method

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

MagickTransparentPaintImage() 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 specified alpha value within the image.
  • alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully transparent.
  • 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> magickTransparentPaintImage({
  required PixelWand target,
  required double alpha,
  required double fuzz,
  required bool invert,
}) async =>
    await _magickCompute(
      _magickTransparentPaintImage,
      _MagickTransparentPaintImageParams(
        _wandPtr.address,
        target._wandPtr.address,
        alpha,
        fuzz,
        invert,
      ),
    );