Ejemplo n.º 1
0
        /// <param name="bitMatrix"> <seealso cref="BitMatrix"/> to parse </param>
        /// <exception cref="FormatException"> if dimension is < 8 or > 144 or not 0 mod 2 </exception>
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: BitMatrixParser(com.google.zxing.common.BitMatrix bitMatrix) throws com.google.zxing.FormatException
        internal BitMatrixParser(BitMatrix bitMatrix)
        {
            int dimension = bitMatrix.Height;
            if (dimension < 8 || dimension > 144 || (dimension & 0x01) != 0)
            {
              throw FormatException.FormatInstance;
            }

            version = readVersion(bitMatrix);
            this.mappingBitMatrix = extractDataRegion(bitMatrix);
            this.readMappingMatrix = new BitMatrix(this.mappingBitMatrix.Width, this.mappingBitMatrix.Height);
        }