decodeHeader method

bool decodeHeader()

Implementation

bool decodeHeader() {
  final signature = br.readBits(8);
  if (signature != VP8L_MAGIC_BYTE) {
    return false;
  }

  webp.format = WebPInfo.FORMAT_LOSSLESS;
  webp.width = br.readBits(14) + 1;
  webp.height = br.readBits(14) + 1;
  webp.hasAlpha = br.readBits(1) != 0;
  final version = br.readBits(3);

  if (version != VP8L_VERSION) {
    return false;
  }

  return true;
}