mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Use RSS14 on the command line; scan more lines since RSS14 stacked kind of needs this; fix VerifyError when RSS14 is enabled on Android
git-svn-id: https://zxing.googlecode.com/svn/trunk@1311 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
95e08d9538
commit
e51dbb3c53
|
@ -205,7 +205,8 @@ limitations under the License.
|
|||
<!-- This works around some strange Android/ProGuard problem verifying MaskUtil -->
|
||||
<arg value="-keep class com.google.zxing.qrcode.encoder.MaskUtil { public * ; }"/>
|
||||
<arg value="-target 5"/>
|
||||
<arg value="-optimizationpasses 4"/>
|
||||
<!-- Keeping this low also avoids some weird Android/ProGuard issue I couldn't resolve otherwise -->
|
||||
<arg value="-optimizationpasses 2"/>
|
||||
<arg value="-dontshrink"/>
|
||||
<arg value="-dontobfuscate"/>
|
||||
<arg value="-dontskipnonpubliclibraryclasses"/>
|
||||
|
|
|
@ -103,12 +103,12 @@ public abstract class OneDReader implements Reader {
|
|||
|
||||
int middle = height >> 1;
|
||||
boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);
|
||||
int rowStep = Math.max(1, height >> (tryHarder ? 8 : 4));
|
||||
int rowStep = Math.max(1, height >> (tryHarder ? 8 : 5));
|
||||
int maxLines;
|
||||
if (tryHarder) {
|
||||
maxLines = height; // Look at the whole image, not just the center
|
||||
} else {
|
||||
maxLines = 9; // Nine rows spaced 1/16 apart is roughly the middle half of the image
|
||||
maxLines = 15; // 15 rows spaced 1/32 apart is roughly the middle half of the image
|
||||
}
|
||||
|
||||
for (int x = 0; x < maxLines; x++) {
|
||||
|
|
|
@ -113,6 +113,7 @@ public final class CommandLineRunner {
|
|||
vector.addElement(BarcodeFormat.UPC_E);
|
||||
vector.addElement(BarcodeFormat.EAN_13);
|
||||
vector.addElement(BarcodeFormat.EAN_8);
|
||||
vector.addElement(BarcodeFormat.RSS14);
|
||||
if (!productsOnly) {
|
||||
vector.addElement(BarcodeFormat.CODE_39);
|
||||
vector.addElement(BarcodeFormat.CODE_128);
|
||||
|
|
Loading…
Reference in a new issue