diff --git a/programming/javascript/api-reference/barcode-reader-module.md b/programming/javascript/api-reference/barcode-reader-module.md index 438a2c9a..dff1eed4 100644 --- a/programming/javascript/api-reference/barcode-reader-module.md +++ b/programming/javascript/api-reference/barcode-reader-module.md @@ -34,7 +34,7 @@ This class defines common functionality in the `BarcodeReader` module. At presen * [DecodedBarcodesUnit](./interfaces/decoded-barcodes-unit.md) * [DeformationResistedBarcode](./interfaces/deformation-resisted-barcode.md) * [DeformationResistedBarcodeImageUnit](./interfaces/deformation-resisted-barcode-image-unit.md) -* [ECI-segment](./interfaces/eci-segment.md) +* [ECISegment](./interfaces/eci-segment.md) * [ExtendedBarcodeResult](./interfaces/extended-barcode-result.md) * [LocalizedBarcodeElement](./interfaces/localized-barcode-element.md) * [LocalizedBarcodesUnit](./interfaces/localized-barcodes-unit.md) diff --git a/programming/javascript/api-reference/index.md b/programming/javascript/api-reference/index.md index 4b52e8a5..3c7e958a 100644 --- a/programming/javascript/api-reference/index.md +++ b/programming/javascript/api-reference/index.md @@ -52,6 +52,7 @@ noTitleIndex: true * [DecodedBarcodesUnit](./interfaces/decoded-barcodes-unit.html) * [DeformationResistedBarcode](./interfaces/deformation-resisted-barcode.html) * [DeformationResistedBarcodeImageUnit](./interfaces/deformation-resisted-barcode-image-unit.html) +* [ECISegment](./interfaces/eci-segment.html) * [ExtendedBarcodeResult](./interfaces/extended-barcode-result.html) * [LocalizedBarcodeElement](./interfaces/localized-barcode-element.html) * [LocalizedBarcodesUnit](./interfaces/localized-barcodes-unit.html) diff --git a/programming/javascript/api-reference/interfaces/deformation-resisted-barcode.md b/programming/javascript/api-reference/interfaces/deformation-resisted-barcode.md index 76043c23..9dd00870 100644 --- a/programming/javascript/api-reference/interfaces/deformation-resisted-barcode.md +++ b/programming/javascript/api-reference/interfaces/deformation-resisted-barcode.md @@ -19,12 +19,12 @@ interface DeformationResistedBarcode { } ``` -## Formats +## format Possible formats of the localized barcode. ```typescript -Formats: EnumBarcodeFormat; +format: EnumBarcodeFormat; ``` **See also** diff --git a/programming/javascript/api-reference/interfaces/scaled-up-barcode-image-unit.md b/programming/javascript/api-reference/interfaces/scaled-up-barcode-image-unit.md deleted file mode 100644 index 6508a80e..00000000 --- a/programming/javascript/api-reference/interfaces/scaled-up-barcode-image-unit.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -layout: default-layout -title: interface ScaledUpBarcodeImageUnit - Dynamsoft Core Module JS Edition API Reference -description: This page shows the JS edition of the interface ScaledUpBarcodeImageUnit in Dynamsoft Core Module. -keywords: scaled up, Image unit, JS -needAutoGenerateSidebar: true -noTitleIndex: true ---- - -# ScaledUpBarcodeImageUnit - -A unit of data that contains scaled up barcode image. It extends the `IntermediateResultUnit` interface. - -```typescript -interface ScaledUpBarcodeImageUnit extends Core.IntermediateResultUnit { - imageData: Core.DSImageData; -} -``` - - -## imageData - -The image data of the scaled-up barcode. - -```typescript -imageData: Core.DSImageData; -``` - -**See also** - -* [DSImageData]({{ site.dcvb_js_api }}core/basic-structures/ds-image-data.html) \ No newline at end of file diff --git a/programming/javascript/migrate-from-v10/index.md b/programming/javascript/migrate-from-v10/index.md index 2d2bc081..9bde9305 100644 --- a/programming/javascript/migrate-from-v10/index.md +++ b/programming/javascript/migrate-from-v10/index.md @@ -8,6 +8,8 @@ needAutoGenerateSidebar: true # How to Upgrade DBR-JS from v10.x to v11.x +> For a full list of changes introduced in v11, see the [v11 Release Notes](../release-notes/js-11.html). + > [!IMPORTANT] > **We strongly recommend upgrading to v11.x.** All future algorithm improvements, performance optimizations, and new features will be developed exclusively for v11 and later versions. Version 10.x and earlier will only receive critical bug fixes and will not benefit from ongoing innovation. @@ -69,6 +71,69 @@ Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = "https://cdn.jsdel > > Eliminate any redundant configuration of `engineResourcePaths`. +#### ImageIO / ImageProcessor / ImageDrawer Methods Are Now Static + +All methods under the `ImageIO`, `ImageProcessor`, and `ImageDrawer` classes have been converted from instance methods to static methods. Update any instance-based calls accordingly: + +```javascript +// v10 - instance method +const processor = new Dynamsoft.Utility.ImageProcessor(); +const result = await processor.convertToBinaryLocal(imageData); + +// v11 - static method +const result = await Dynamsoft.Utility.ImageProcessor.convertToBinaryLocal(imageData); +``` + +#### CodeParserModule.loadSpec() Now Returns a Promise + +`CodeParserModule.loadSpec()` previously returned `void`. In v11, it returns `Promise`, allowing you to detect and handle spec loading failures: + +```javascript +// v10 - no return value +CodeParserModule.loadSpec("AAMVA_DL_ID"); + +// v11 - handle errors +const errorInfo = await CodeParserModule.loadSpec("AAMVA_DL_ID"); +if (errorInfo.errorCode !== 0) { + console.error("Spec load failed:", errorInfo.errorMessage); +} +``` + +#### Parser Resource Files Changed to .data Format + +Starting from v11.4.2000, Code parser specification files have been consolidated into `.data` files, one per code type, for improved security and simplified distribution. This affects both the resource files themselves and the string passed to `loadSpec()`. + +**`loadSpec()` argument update**: Sub-type strings are now merged into their parent type name. Old strings remain supported via a JavaScript-layer mapping, but updating to the new names is recommended: + +| v10 `loadSpec()` call | v11 `loadSpec()` call | +| --- | --- | +| `loadSpec("MRTD_TD3_PASSPORT")` | `loadSpec("MRTD")` | +| `loadSpec("MRTD_TD1_ID")` | `loadSpec("MRTD")` | +| `loadSpec("MRTD_TD2_ID")` | `loadSpec("MRTD")` | +| `loadSpec("AAMVA_DL_ID")` | `loadSpec("AAMVA_DL_ID")` | +| `loadSpec("AAMVA_DL_ID_WITH_MAG_STRIPE")` | `loadSpec("AAMVA_DL_ID")` | + +```javascript +// before v11.4.2000 +Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD3_PASSPORT"); +Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD1_ID"); +Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD_TD2_ID"); + +// now (recommended) +Dynamsoft.DCP.CodeParserModule.loadSpec("MRTD"); +``` + +**Self-hosted resource files**: If you host these files yourself, replace the old `.data` & `_Map.text` files with the new `.data` equivalents: + +| Old File | New File | +| --- | --- | +| `AADHAAR.json` | `AADHAAR.data` | +| `AAMVA_DL_ID.json` | `AAMVA_DL_ID.data` | +| `GS1_AI.json` | `GS1_AI.data` | +| `MRTD.json` | `MRTD.data` | +| `SOUTH_AFRICA_DL.json` | `SOUTH_AFRICA_DL.data` | +| `VIN.json` | `VIN.data` | + ### Upgrade your template The template system has been enhanced in v11 to support more powerful customization options and better performance. Templates from v10.x are not directly compatible with v11. diff --git a/programming/javascript/user-guide/use-in-framework.md b/programming/javascript/user-guide/use-in-framework.md index c1cd193f..49c3198b 100644 --- a/programming/javascript/user-guide/use-in-framework.md +++ b/programming/javascript/user-guide/use-in-framework.md @@ -316,6 +316,7 @@ To complete the code, we'll include the [`CaptureVisionRouter`](https://www.dyna import "../dynamsoft.config"; import { CameraEnhancer, CameraView } from "dynamsoft-camera-enhancer"; import { CaptureVisionRouter } from "dynamsoft-capture-vision-router"; +import { MultiFrameResultCrossFilter } from "dynamsoft-utility"; let cameraEnhancer; let pCameraEnhancer; // promise of cameraEnhancer