fromRGBA static method

Image fromRGBA(
  1. int width,
  2. int height,
  3. List<int> data
)

Implementation

static Image fromRGBA(int width, int height, List<int> data) {
  assert(data.length == width * height * 4);
  final mem = malloc.call<Uint8>(data.length);
  mem.asTypedList(data.length).setAll(0, data);
  return Image._(imageFromRGBA(width, height, mem));
}