getChannel method

  1. @override
int getChannel(
  1. int x,
  2. int y, [
  3. ImageChannel? channel
])
override

Implementation

@override
int getChannel(int x, int y, [ImageChannel? channel]) {
  assert(x >= 0 && x < width, 'x($x) out of with boundary(0 - $width)');
  assert(y >= 0 && y < height, 'y($y) out of height boundary(0 - $height)');
  assert(channel != null);
  return _buffer.getUint8(
      y * _width * bytePerPixel + x * bytePerPixel + channel!.index);
}