Skip to content

Commit

Permalink
fix(codabar): preserve start and end control chars (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant authored Aug 21, 2024
1 parent 9b70659 commit 519cfe2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-dogs-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"barcode-detector": patch
---

Preserve codabar start and end control chars
4 changes: 4 additions & 0 deletions src/BarcodeDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ export class BarcodeDetector extends EventTarget {
if (isBlob(imageDataOrBlob)) {
zxingReadOutputs = await readBarcodesFromImageFile(imageDataOrBlob, {
tryHarder: true,
// https://github.com/Sec-ant/barcode-detector/issues/91
returnCodabarStartEnd: true,
formats: this.#formats.map((format) => formatMap.get(format)!),
});
} else {
zxingReadOutputs = await readBarcodesFromImageData(imageDataOrBlob, {
tryHarder: true,
// https://github.com/Sec-ant/barcode-detector/issues/91
returnCodabarStartEnd: true,
formats: this.#formats.map((format) => formatMap.get(format)!),
});
}
Expand Down

0 comments on commit 519cfe2

Please sign in to comment.