wrong barcode generated ( image updated ) #738

Closed
yuchulho opened this Issue Jan 5, 2017 · 1 comment

Projects

None yet

2 participants

@yuchulho
yuchulho commented Jan 5, 2017

bug report.

when I tried to encode some numbers, but actually zxing library generates wrong barcode in (zxing 3.3)

MultiFormatWriter makes invalid barcodes with below combination.
i.g) type : UPC_E, number : 12345670
codes ) BitMatrix result = new MultiFormatWriter().encode("12345670", BarcodeFormat.UPC_E, ??, ??, ??);
kindly check this case.

  • correct barcode
    correct_12345670_upc-e

  • generated by zxing library
    image

  • captured screen
    captured_12345670_upc-e

thank you

@srowen
Contributor
srowen commented Jan 6, 2017

Ah, that's much better. The problem is that the UPC-E writer doesn't take into account the number system (first digit) and effectively assumes a 0. That should be an easy fix.

@srowen srowen self-assigned this Jan 6, 2017
@srowen srowen added this to the 3.3.1 milestone Jan 6, 2017
@srowen srowen added the bug label Jan 6, 2017
@srowen srowen added a commit that closed this issue Jan 6, 2017
@srowen srowen Closes #738 : fix UPC-E encoding with system 1 b8c3d08
@srowen srowen closed this in b8c3d08 Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment