magickSampleImage method

Future<bool> magickSampleImage({
  1. required int columns,
  2. required int rows,
})

MagickSampleImage() scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image.

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

  • columns: the number of columns in the scaled image.
  • rows: the number of rows in the scaled image.

Implementation

Future<bool> magickSampleImage({
  required int columns,
  required int rows,
}) async =>
    await _magickCompute(
      _magickSampleImage,
      _MagickSampleImageParams(
        _wandPtr.address,
        columns,
        rows,
      ),
    );