mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Tiny style bits
git-svn-id: https://zxing.googlecode.com/svn/trunk@1528 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
56ad5f5554
commit
f2ac4e651b
|
@ -186,7 +186,7 @@ final class ExpandedProductResultParser extends ResultParser {
|
||||||
// We look for a new AI. If it doesn't exist (ERROR), we coninue
|
// We look for a new AI. If it doesn't exist (ERROR), we coninue
|
||||||
// with the iteration
|
// with the iteration
|
||||||
if ("ERROR".equals(findAIvalue(index, rawTextAux))) {
|
if ("ERROR".equals(findAIvalue(index, rawTextAux))) {
|
||||||
buf.append(c);
|
buf.append('(');
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,12 +79,10 @@ public final class Decoder {
|
||||||
*
|
*
|
||||||
* @param bits booleans representing white/black QR Code modules
|
* @param bits booleans representing white/black QR Code modules
|
||||||
* @return text and bytes encoded within the QR Code
|
* @return text and bytes encoded within the QR Code
|
||||||
* @throws NotFoundException if the QR Code cannot be found
|
|
||||||
* @throws FormatException if the QR Code cannot be decoded
|
* @throws FormatException if the QR Code cannot be decoded
|
||||||
* @throws ChecksumException if error correction fails
|
* @throws ChecksumException if error correction fails
|
||||||
*/
|
*/
|
||||||
public DecoderResult decode(BitMatrix bits, Hashtable hints)
|
public DecoderResult decode(BitMatrix bits, Hashtable hints) throws FormatException, ChecksumException {
|
||||||
throws NotFoundException, FormatException, ChecksumException {
|
|
||||||
|
|
||||||
// Construct a parser and read version, error-correction level
|
// Construct a parser and read version, error-correction level
|
||||||
BitMatrixParser parser = new BitMatrixParser(bits);
|
BitMatrixParser parser = new BitMatrixParser(bits);
|
||||||
|
|
|
@ -160,7 +160,7 @@ public class Detector {
|
||||||
sourceBottomRightX = sourceBottomRightY = dimMinusThree;
|
sourceBottomRightX = sourceBottomRightY = dimMinusThree;
|
||||||
}
|
}
|
||||||
|
|
||||||
PerspectiveTransform transform = PerspectiveTransform.quadrilateralToQuadrilateral(
|
return PerspectiveTransform.quadrilateralToQuadrilateral(
|
||||||
3.5f,
|
3.5f,
|
||||||
3.5f,
|
3.5f,
|
||||||
dimMinusThree,
|
dimMinusThree,
|
||||||
|
@ -177,8 +177,6 @@ public class Detector {
|
||||||
bottomRightY,
|
bottomRightY,
|
||||||
bottomLeft.getX(),
|
bottomLeft.getX(),
|
||||||
bottomLeft.getY());
|
bottomLeft.getY());
|
||||||
|
|
||||||
return transform;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BitMatrix sampleGrid(BitMatrix image,
|
private static BitMatrix sampleGrid(BitMatrix image,
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.google.zxing.EncodeHintType;
|
||||||
import com.google.zxing.WriterException;
|
import com.google.zxing.WriterException;
|
||||||
import com.google.zxing.common.BitArray;
|
import com.google.zxing.common.BitArray;
|
||||||
import com.google.zxing.common.CharacterSetECI;
|
import com.google.zxing.common.CharacterSetECI;
|
||||||
|
import com.google.zxing.common.ECI;
|
||||||
import com.google.zxing.common.reedsolomon.GF256;
|
import com.google.zxing.common.reedsolomon.GF256;
|
||||||
import com.google.zxing.common.reedsolomon.ReedSolomonEncoder;
|
import com.google.zxing.common.reedsolomon.ReedSolomonEncoder;
|
||||||
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
|
||||||
|
@ -547,7 +548,7 @@ public final class Encoder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void appendECI(CharacterSetECI eci, BitArray bits) {
|
private static void appendECI(ECI eci, BitArray bits) {
|
||||||
bits.appendBits(Mode.ECI.getBits(), 4);
|
bits.appendBits(Mode.ECI.getBits(), 4);
|
||||||
// This is correct for values up to 127, which is all we need now.
|
// This is correct for values up to 127, which is all we need now.
|
||||||
bits.appendBits(eci.getValue(), 8);
|
bits.appendBits(eci.getValue(), 8);
|
||||||
|
|
Loading…
Reference in a new issue