loadRgbPixels method

void loadRgbPixels(
  1. List pixels,
  2. List<int> shape
)

Load a list of RGB pixels into this TensorImage

Throws ArgumentError if pixels is not List

Implementation

void loadRgbPixels(List pixels, List<int> shape) {
  TensorBuffer buffer = TensorBuffer.createDynamic(dataType);
  buffer.loadList(pixels, shape: shape);
  loadTensorBuffer(buffer);
}