readPlane method
void
readPlane(
- InputBuffer input,
- int width,
- int height,
- int? bitDepth, [
- int? compression,
- Uint16List? lineLengths,
- int planeNum = 0,
Implementation
void readPlane(InputBuffer input, int width, int height, int? bitDepth,
[int? compression, Uint16List? lineLengths, int planeNum = 0]) {
compression ??= input.readUint16();
switch (compression) {
case COMPRESS_NONE:
_readPlaneUncompressed(input, width, height, bitDepth!);
break;
case COMPRESS_RLE:
lineLengths ??= _readLineLengths(input, height);
_readPlaneRleCompressed(
input, width, height, bitDepth!, lineLengths, planeNum);
break;
default:
throw ImageException('Unsupported compression: $compression');
}
}