magickBrightnessContrastImage method

Future<bool> magickBrightnessContrastImage({
  1. required double brightness,
  2. required double contrast,
})

Use magickBrightnessContrastImage() to change the brightness and/or contrast of an image. It converts the brightness and contrast parameters into slope and intercept and calls a polynomial function to apply to the image.

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

  • brightness : the brightness percent (-100 .. 100).
  • contrast : the contrast percent (-100 .. 100).

Implementation

Future<bool> magickBrightnessContrastImage({
  required double brightness,
  required double contrast,
}) async =>
    await _magickCompute(
      _magickBrightnessContrastImage,
      _MagickBrightnessContrastImageParams(
        _wandPtr.address,
        brightness,
        contrast,
      ),
    );