getIndexMap method

Uint8List getIndexMap(
  1. Image image
)

Convert the image to an index map, mapping to this colorMap.

Implementation

Uint8List getIndexMap(Image image) {
  final map = Uint8List(image.width * image.height);
  for (var i = 0, len = image.length; i < len; ++i) {
    map[i] = lookup(image[i]);
  }
  return map;
}