pixelGetCurrentIteratorRow method

Future<List<PixelWand>> pixelGetCurrentIteratorRow()

Returns the current row as an array of pixel wands from the pixel iterator.

Don't forget to destroy each of the returned pixel wands using destroyPixelWand when you are done with them.

This method runs in a different isolate than the main isolate.

Implementation

Future<List<PixelWand>> pixelGetCurrentIteratorRow() async {
  List<int> pixelWandsAddresses = await _magickCompute(
    _pixelGetCurrentIteratorRow,
    _iteratorPtr.address,
  );
  List<PixelWand> pixelWands = [];
  for (int i = 0; i < pixelWandsAddresses.length; i++) {
    PixelWand? pixelWand = PixelWand._fromAddress(pixelWandsAddresses[i]);
    pixelWands.add(pixelWand!);
  }
  return pixelWands;
}