BitMatrixParser constructor
BitMatrixParser(
- BitMatrix bitMatrix
@param bitMatrix BitMatrix to parse @throws FormatException if dimension is < 8 or > 144 or not 0 mod 2
Implementation
BitMatrixParser(BitMatrix bitMatrix) {
final dimension = bitMatrix.height;
if (dimension < 8 || dimension > 144 || (dimension & 0x01) != 0) {
throw FormatsException.instance;
}
_version = _readVersion(bitMatrix);
_mappingBitMatrix = _extractDataRegion(bitMatrix);
_readMappingMatrix =
BitMatrix(_mappingBitMatrix.width, _mappingBitMatrix.height);
}