PCanvasPixels.fromBytes constructor
Construct a PCanvasPixels from bytes.
- If
bytesis a TypedData it will be converted to an Uint32List through its internal ByteBuffer. - If
bytesis 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, likex86andARMv8.
Implementation
PCanvasPixels.fromBytes(int width, int height, List<int> bytes)
: this.fromPixels(width, height, _bytesToUint32List(bytes));