getPixelAt method
Returns the RGB pixel at the given coordinate.
The origin is the top left corner. Indices are zero-based.
Implementation
Rgb565 getPixelAt(int x, int y) {
(x, y) = (y, x);
final index = _memoryIndex(x, y);
final color = buffer.getUint16(index * _bytesPerPixel, endianness);
return Rgb565.fromInt(color);
}