magickConstituteImageFromShortPixel method

Future<bool> magickConstituteImageFromShortPixel({
  1. required int columns,
  2. required int rows,
  3. required String map,
  4. required Uint16List pixels,
})

Adds an image to the wand comprised of the pixel data you supply. The pixel data must be in scanline order top-to-bottom.

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

  • columns: width in pixels of the image.

  • rows: height in pixels of the image.

  • 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.

  • pixels: A Uint16List of values contain the pixel components as defined by map.

  • See also: magickExportImageShortPixels.

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<bool> magickConstituteImageFromShortPixel({
  required int columns,
  required int rows,
  required String map,
  required Uint16List pixels,
}) async =>
    await _magickCompute(
      _magickConstituteImage,
      _MagickConstituteImageParams(
        _wandPtr.address,
        columns,
        rows,
        map,
        _StorageType.ShortPixel,
        pixels,
      ),
    );