magickLevelImageColors method

Future<bool> magickLevelImageColors({
  1. required PixelWand blackColor,
  2. required PixelWand whiteColor,
  3. required bool invert,
})

MagickLevelImageColors() maps the given color to "black" and "white" values, linearly spreading out the colors, and level values on a channel by channel bases, as per LevelImage(). The given colors allows you to specify different level ranges for each of the color channels separately.

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

  • blackColor: the black color.
  • whiteColor: the white color.
  • invert: if true map the colors (levelize), rather than from (level)

Implementation

Future<bool> magickLevelImageColors({
  required PixelWand blackColor,
  required PixelWand whiteColor,
  required bool invert,
}) async =>
    await _magickCompute(
      _magickLevelImageColors,
      _MagickLevelImageColorsParams(
        _wandPtr.address,
        blackColor._wandPtr.address,
        whiteColor._wandPtr.address,
        invert,
      ),
    );