toPixelsFromRgba static method

List<int> toPixelsFromRgba(
  1. List<int> rgba, {
  2. bool greyscale = false,
})

Implementation

static List<int> toPixelsFromRgba(List<int> rgba, {bool greyscale = false})
{
  return List<int>.generate(rgba.length ~/ 4, (index) => (greyscale == true) ? getColorFromByte(rgba, index * 4) : getColorFromByte(rgba, index * 4));
}