magickExportImageCharPixels method

Future<Uint8List?> magickExportImageCharPixels({
  1. required int x,
  2. required int y,
  3. required int columns,
  4. required int rows,
  5. required String map,
})

Extracts pixel data from an image and returns it to you. The data is returned as in the order specified by map.

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

  • x: The region x offset.

  • y: The region y offset.

  • columns: The region width.

  • rows: The region height.

  • map: This string reflects the expected ordering of the pixel array. It can be any combination or order of R = red, G = green, B = blue, A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan, Y = yellow, M = magenta, K = black, I = intensity (for grayscale), P = pad.

  • See also: magickConstituteImageFromCharPixel

Sending invalid parameters will cause an invalid state and may crash the app, so you should make sure to validate the input to this method.

Implementation

Future<Uint8List?> magickExportImageCharPixels({
  required int x,
  required int y,
  required int columns,
  required int rows,
  required String map,
}) async =>
    await _magickCompute(
      _magickExportImageCharPixels,
      _MagickExportImagePixelsParams(
        _wandPtr.address,
        x,
        y,
        columns,
        rows,
        map,
      ),
    );