magickNewImage method

Future<bool> magickNewImage({
  1. required int width,
  2. required int height,
  3. required PixelWand background,
})

MagickNewImage() adds a blank image canvas of the specified size and background color to the wand.

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

  • width: the image width.
  • height: the image height.
  • background: the image background color.

Implementation

Future<bool> magickNewImage({
  required int width,
  required int height,
  required PixelWand background,
}) async =>
    await _magickCompute(
      _magickNewImage,
      _MagickNewImageParams(
        _wandPtr.address,
        width,
        height,
        background._wandPtr.address,
      ),
    );