WebPAlpha constructor
WebPAlpha(
- InputBuffer input,
- int width,
- int height
Implementation
WebPAlpha(this.input, this.width, this.height) {
final b = input.readByte();
method = b & 0x03;
filter = (b >> 2) & 0x03;
preProcessing = (b >> 4) & 0x03;
rsrv = (b >> 6) & 0x03;
if (isValid) {
if (method == ALPHA_NO_COMPRESSION) {
final alphaDecodedSize = width * height;
if (input.length < alphaDecodedSize) {
rsrv = 1;
}
} else if (method == ALPHA_LOSSLESS_COMPRESSION) {
if (!_decodeAlphaHeader()) {
rsrv = 1;
}
} else {
rsrv = 1;
}
}
}