setPixelR method
Set the red channel of the pixel, or the index value for palette images.
Implementation
@override
void setPixelR(int x, int y, num i) {
final index = y * width * numChannels + (x * numChannels);
data[index] = Float16.doubleToFloat16(i);
}