magickImportImageDoublePixels method

Future<bool> magickImportImageDoublePixels({
  1. required int x,
  2. required int y,
  3. required int columns,
  4. required int rows,
  5. required String map,
  6. required Float64List pixels,
})

MagickImportImageDoublePixels() accepts pixel data and stores it in the image at the location you specify. The method returns true on success otherwise false if an error is encountered. The pixel data should be as 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.

  • pixels: The pixel data.

  • 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> magickImportImageDoublePixels({
  required int x,
  required int y,
  required int columns,
  required int rows,
  required String map,
  required Float64List pixels,
}) async =>
    await _magickCompute(
      _magickImportImagePixels,
      _MagickImportImagePixelsParams(
        _wandPtr.address,
        x,
        y,
        columns,
        rows,
        map,
        _StorageType.DoublePixel,
        pixels,
      ),
    );