getRed method

num getRed(
  1. int x,
  2. int y
)

Get the value of the red channel at the given pixel coordinates x, y.

Implementation

num getRed(int x, int y) => red != null
    ? red!.isFloat
        ? red!.getFloat(x, y)
        : red!.getInt(x, y)
    : 0;