Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add reader support for DataBarLimited #159

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-gifts-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"zxing-wasm": minor
---

Bump zxing-cpp to `daa502d`, and add reader support for `DataBarLimited`.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This package exports 3 subpaths: `full`, `reader` and `writer`. You can choose w

### `zxing-wasm` or `zxing-wasm/full`

These 2 subpaths include functions to both read and write barcodes. The wasm binary size is ~1.06 MB.
These 2 subpaths include functions to both read and write barcodes. The wasm binary size is ~1.19 MB.

```ts
import {
Expand All @@ -67,7 +67,7 @@ import {

### `zxing-wasm/reader`

This subpath only includes functions to read barcodes. The wasm binary size is ~831 KB.
This subpath only includes functions to read barcodes. The wasm binary size is ~917 KB.

```ts
import {
Expand All @@ -78,7 +78,7 @@ import {

### `zxing-wasm/writer`

This subpath only includes a function to write barcodes. The wasm binary size is ~313 KB.
This subpath only includes a function to write barcodes. The wasm binary size is ~366 KB.

```ts
import { writeBarcodeToImageFile } from "zxing-wasm/writer";
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/barcodeFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const barcodeFormats = [
"Code93",
"DataBar",
"DataBarExpanded",
"DataBarLimited",
"DataMatrix",
"DXFilmEdge",
"EAN-13",
Expand Down Expand Up @@ -40,6 +41,7 @@ export type WriteInputBarcodeFormat = Exclude<
BarcodeFormat,
| "DataBar"
| "DataBarExpanded"
| "DataBarLimited"
| "DXFilmEdge"
| "MaxiCode"
| "MicroQRCode"
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/readResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export interface ReadResult
*
* Possible values are:
* `"Aztec"`, `"Codabar"`, `"Code128"`, `"Code39"`, `"Code93"`,
* `"DataBar"`, `"DataBarExpanded"`, `"DataMatrix"`, `"DXFilmEdge"`,
* `"DataBar"`, `"DataBarExpanded"`, `"DataBarLimited"`, `"DataMatrix"`, `"DXFilmEdge"`,
* `"EAN-13"`, `"EAN-8"`, `"ITF"`,
* `"MaxiCode"`, `"MicroQRCode"`, `"None"`,
* `"PDF417"`, `"QRCode"`, `"rMQRCode"`, `"UPC-A"`, `"UPC-E"`
Expand Down
2 changes: 1 addition & 1 deletion src/bindings/readerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface ReaderOptions
*
* Supported values in this list are:
* `"Aztec"`, `"Codabar"`, `"Code128"`, `"Code39"`, `"Code93"`,
* `"DataBar"`, `"DataBarExpanded"`, `"DataMatrix"`, `"DXFilmEdge"`,
* `"DataBar"`, `"DataBarExpanded"`, `"DataBarLimited"`, `"DataMatrix"`, `"DXFilmEdge"`,
* `"EAN-13"`, `"EAN-8"`, `"ITF"`, `"Linear-Codes"`, `"Matrix-Codes"`,
* `"MaxiCode"`, `"MicroQRCode"`, `"PDF417"`, `"QRCode"`, `"rMQRCode"`, `"UPC-A"`, `"UPC-E"`
*
Expand Down
2 changes: 1 addition & 1 deletion zxing-cpp
Submodule zxing-cpp updated 40 files
+11 −10 README.md
+2 −0 core/CMakeLists.txt
+5 −0 core/src/BarcodeFormat.cpp
+4 −2 core/src/BarcodeFormat.h
+4 −0 core/src/CharacterSet.cpp
+6 −3 core/src/MultiFormatReader.cpp
+7 −0 core/src/RegressionLine.h
+1 −0 core/src/WriteBarcode.cpp
+3 −1 core/src/ZXingC.h
+4 −7 core/src/oned/ODDataBarCommon.cpp
+15 −0 core/src/oned/ODDataBarCommon.h
+199 −0 core/src/oned/ODDataBarLimitedReader.cpp
+23 −0 core/src/oned/ODDataBarLimitedReader.h
+11 −1 core/src/oned/ODReader.cpp
+2 −1 example/ZXingQtReader.h
+6 −0 test/blackbox/BlackboxTestRunner.cpp
+0 −1 test/samples/README
+ test/samples/databarltd-1/00.png
+1 −0 test/samples/databarltd-1/00.txt
+ test/samples/databarltd-1/01.jpg
+1 −0 test/samples/databarltd-1/01.result.txt
+1 −0 test/samples/databarltd-1/01.txt
+4 −0 test/unit/aztec/AZEncoderTest.cpp
+4 −0 test/unit/aztec/AZHighLevelEncoderTest.cpp
+1 −1 wrappers/android/gradle/libs.versions.toml
+1 −1 wrappers/android/gradle/wrapper/gradle-wrapper.properties
+2 −2 wrappers/android/zxingcpp/build.gradle.kts
+1 −0 wrappers/android/zxingcpp/src/main/cpp/ZXingCpp.cpp
+1 −1 wrappers/android/zxingcpp/src/main/java/zxingcpp/BarcodeReader.kt
+2 −1 wrappers/dotnet/ZXingCpp/ZXingCpp.cs
+1 −1 wrappers/ios/Sources/Wrapper/ZXIFormat.h
+4 −0 wrappers/ios/Sources/Wrapper/ZXIFormatHelper.mm
+1 −0 wrappers/kn/src/nativeMain/kotlin/zxingcpp/BarcodeFormat.kt
+1 −0 wrappers/python/zxing.cpp
+3 −2 wrappers/rust/src/bindings.rs
+3 −2 wrappers/rust/src/lib.rs
+1 −0 wrappers/wasm/demo_cam_reader.html
+1 −0 wrappers/wasm/demo_reader.html
+4 −0 wrappers/winrt/BarcodeReader.cpp
+1 −0 wrappers/winrt/BarcodeReader.h