PCanvasPixels.fromBytes constructor
Construct a PCanvasPixels from bytes
.
- If
bytes
is a TypedData it will be converted to an Uint32List through its internal ByteBuffer. - If
bytes
is not a TypedData it will be converted to a Uint8ClampedList.fromList and after that to an Uint32List. - Note that in most systems the Endian.host is 'little-endian'.
- Modern CPU architectures are
little-endian
, likex86
andARMv8
.
Implementation
PCanvasPixels.fromBytes(int width, int height, List<int> bytes)
: this.fromPixels(width, height, _bytesToUint32List(bytes));