magickConstituteImageFromDoublePixel method

Future<bool> magickConstituteImageFromDoublePixel({
  1. required int columns,
  2. required int rows,
  3. required String map,
  4. required Float64List 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 Float64List of values contain the pixel components as defined by map.

  • See also: magickExportImageDoublePixels.

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