public QRCodeBlackBox4TestCase() {
super("test/data/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE);
- addTest(35, 35, 0.0f);
+ addTest(36, 36, 0.0f);
addTest(36, 36, 90.0f);
- addTest(34, 34, 180.0f);
- addTest(34, 34, 270.0f);
+ addTest(35, 35, 180.0f);
+ addTest(35, 35, 270.0f);
}
}
int pixel = rgb[offset + x];
int luminance = (306 * ((pixel >> 16) & 0xFF) +
601 * ((pixel >> 8) & 0xFF) +
- 117 * (pixel & 0xFF)) >> 10;
+ 117 * (pixel & 0xFF) +
+ (0x200)) >> 10; // 0x200 = 1<<9, half an lsb of the result to force rounding
matrix[offset + x] = (byte) luminance;
}
}