dynamsoft-barcode-reader-bundle 11.6.3000 → 11.6.3100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.html CHANGED
@@ -247,7 +247,7 @@
247
247
  <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
248
248
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;camera-view-container&quot;</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;width: 100%; height: 60vh&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
249
249
  <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">id</span>=<span class="hljs-string">&quot;results&quot;</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&quot;width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto&quot;</span> <span class="hljs-attr">disabled</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
250
- <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
250
+ <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
251
251
  <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
252
252
  Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">&quot;DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9&quot;</span>);
253
253
  Dynamsoft.Core.CoreModule.loadWasm();
@@ -261,11 +261,9 @@
261
261
 
262
262
  <span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
263
263
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver({ <span class="hljs-attr">onDecodedBarcodesReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
264
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
265
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
266
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
267
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
268
- }
264
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
265
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
266
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
269
267
  }
270
268
  }});
271
269
 
@@ -282,7 +280,7 @@
282
280
  <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
283
281
  </code></pre>
284
282
  <p align="center" style="text-align:center; white-space: normal; ">
285
- <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.30/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
283
+ <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.31/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
286
284
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
287
285
  </a>
288
286
  &nbsp;
@@ -290,7 +288,7 @@
290
288
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" >
291
289
  </a>
292
290
  &nbsp;
293
- <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.30&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
291
+ <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
294
292
  <img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
295
293
  </a>
296
294
  </p>
@@ -333,7 +331,7 @@ cvRouter.addResultFilter(filter);
333
331
  <p>Read more on <a href="https://www.dynamsoft.com/capture-vision/docs/core/architecture/#capture-vision-router">Capture Vision Router</a>.</p>
334
332
  </blockquote>
335
333
  <h3 id="run-the-example">Run the example</h3>
336
- <p>You can run the example deployed to <a href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.30&utm_source=npm">the Dynamsoft Demo Server</a> or test it with <a href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/">JSFiddle code editor</a>. </p>
334
+ <p>You can run the example deployed to <a href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm">the Dynamsoft Demo Server</a> or test it with <a href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/">JSFiddle code editor</a>. </p>
337
335
  <p>You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.</p>
338
336
  <p>When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed.</p>
339
337
  <p>Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser.</p>
@@ -341,7 +339,7 @@ cvRouter.addResultFilter(filter);
341
339
  <p><em>Secure Contexts</em>:</p>
342
340
  <p>If you open the web page as <code>http://</code>, our SDK may not work correctly because the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia">MediaDevices: getUserMedia()</a> and other methods only work in <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts">secure contexts</a> (HTTPS, <code>localhost</code>, <code>127.0.0.1</code>, <code>file://</code>), in some or all supporting browsers.</p>
343
341
  <p>Regarding configuring https on your server, these guides for <a href="https://nginx.org/en/docs/http/configuring_https_servers.html">nginx</a> / <a href="https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/">IIS</a> / <a href="https://dzone.com/articles/setting-ssl-tomcat-5-minutes">tomcat</a> / <a href="https://nodejs.org/docs/v0.4.1/api/tls.html">nodejs</a> might help.</p>
344
- <p>If the test doesn't go as expected, you can <a href="https://www.dynamsoft.com/company/contact/?ver=11.6.30&utm_source=npm&product=dbr&package=js">contact us</a>.</p>
342
+ <p>If the test doesn't go as expected, you can <a href="https://www.dynamsoft.com/company/contact/?ver=11.6.31&utm_source=npm&product=dbr&package=js">contact us</a>.</p>
345
343
  </blockquote>
346
344
  <h2 id="preparing-the-sdk">Preparing the SDK</h2>
347
345
  <h3 id="step-1-include-the-sdk">Step 1: Include the SDK</h3>
@@ -355,24 +353,24 @@ cvRouter.addResultFilter(filter);
355
353
  <ul>
356
354
  <li>jsDelivr</li>
357
355
  </ul>
358
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
356
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
359
357
  </code></pre>
360
358
  <ul>
361
359
  <li>UNPKG</li>
362
360
  </ul>
363
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
361
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
364
362
  </code></pre>
365
363
  <!-- - In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test.
366
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
364
+ <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
367
365
  </code></pre>
368
366
 
369
367
  However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. -->
370
368
  <ul>
371
369
  <li>In frameworks like React, Vue and Angular, you may want to add the package as a dependency.</li>
372
370
  </ul>
373
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3000 -E
371
+ <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
374
372
  <span class="hljs-comment"># or</span>
375
- yarn add dynamsoft-barcode-reader-bundle@11.6.3000 -E
373
+ yarn add dynamsoft-barcode-reader-bundle@11.6.3100 -E
376
374
  </code></pre>
377
375
  <p>NOTE that in frameworks, you need to <a href="#2-optional-specify-the-location-of-the-engine-files">specify the location of the engine files</a>.</p>
378
376
  <div class="multi-panel-end"></div>
@@ -381,18 +379,18 @@ cvRouter.addResultFilter(filter);
381
379
  <p>Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application.</p>
382
380
  <ul>
383
381
  <li><p>From the website</p>
384
- <p><a href="https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.30&utm_source=npm&product=dbr&package=js">Download Dynamsoft Barcode Reader JavaScript Package</a></p>
382
+ <p><a href="https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.31&utm_source=npm&product=dbr&package=js">Download Dynamsoft Barcode Reader JavaScript Package</a></p>
385
383
  <p>The resources are located at the path <code>dynamsoft-barcode-reader-js-{version-number}/dist/</code>.</p></li>
386
384
  <li><p>From npm</p></li>
387
385
  </ul>
388
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3000 -E
386
+ <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
389
387
  </code></pre>
390
388
  <p>The resources are located at the path <code>node_modules/&lt;pkg&gt;</code>, without <code>@&lt;version&gt;</code>. You must copy "dynamsoft-xxx" packages elsewhere and add <code>@&lt;version&gt;</code>. The <code>&lt;version&gt;</code> can be obtained from <code>package.json</code> of each package. Another thing to do is to <a href="#2-optional-specify-the-location-of-the-engine-files">specify the engineResourcePaths</a> so that the SDK can correctly locate the resources.</p>
391
389
  <blockquote>
392
390
  <p>Since "node<em>modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node</em>modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting.</p>
393
391
  </blockquote>
394
392
  <p>You can typically include SDK like this:</p>
395
- <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;path/to/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
393
+ <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">&quot;path/to/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js&quot;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
396
394
  </code></pre>
397
395
  <div class="multi-panel-end"></div>
398
396
  <div class="multi-panel-switching-end"></div>
@@ -416,7 +414,7 @@ cvRouter.addResultFilter(filter);
416
414
  <p>To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key.</p>
417
415
  <pre><code class="hljs javascript language-javascript">Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">&quot;DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9&quot;</span>);
418
416
  </code></pre>
419
- <p>As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.30&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.</p>
417
+ <p>As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.31&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.</p>
420
418
  <blockquote>
421
419
  <p>Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.</p>
422
420
  </blockquote>
@@ -479,12 +477,10 @@ cvRouter.setInput(cameraEnhancer);
479
477
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
480
478
  <span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
481
479
  resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
482
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
483
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
484
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
485
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
486
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
487
- }
480
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
481
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
482
+ <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
483
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
488
484
  }
489
485
  };
490
486
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver(resultReceiver);
@@ -492,12 +488,10 @@ resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span c
492
488
  <p>You can also write code like this. It is the same.</p>
493
489
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#results&quot;</span>);
494
490
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver({ <span class="hljs-attr">onDecodedBarcodesReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
495
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
496
- resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
497
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
498
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
499
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
500
- }
491
+ resultsContainer.textContent = <span class="hljs-string">&#x27;&#x27;</span>;
492
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
493
+ <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
494
+ resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
501
495
  }
502
496
  }});
503
497
  </code></pre>
@@ -588,13 +582,11 @@ settings.barcodeSettings.barcodeFormatIds = Dynamsoft.DBR.EnumBarcodeFormat.BF_Q
588
582
  <span class="hljs-attr">onCapturedResultReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
589
583
  <span class="hljs-comment">//Check for barcode results</span>
590
584
  <span class="hljs-keyword">let</span> barcodeResultItems = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_BARCODE);
591
- <span class="hljs-keyword">if</span> (barcodeResultItems.length &gt; <span class="hljs-number">0</span>) {
592
- <span class="hljs-keyword">let</span> image = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[<span class="hljs-number">0</span>]?.imageData; <span class="hljs-comment">// Retrieve the original image.</span>
593
- <span class="hljs-keyword">if</span> (image) <span class="hljs-built_in">document</span>.body.appendChild(image.toCanvas()); <span class="hljs-comment">// Append the image to DOM.</span>
594
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> barcodeResultItems) {
595
- <span class="hljs-comment">// Print each barcode result to the console.</span>
596
- <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Barcode: <span class="hljs-subst">${item.text}</span>, Format: <span class="hljs-subst">${item.formatString}</span>`</span>);
597
- }
585
+ <span class="hljs-keyword">let</span> image = result.items.filter(<span class="hljs-function">(<span class="hljs-params">item</span>) =&gt;</span> item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[<span class="hljs-number">0</span>]?.imageData; <span class="hljs-comment">// Retrieve the original image.</span>
586
+ <span class="hljs-keyword">if</span> (image) <span class="hljs-built_in">document</span>.body.appendChild(image.toCanvas()); <span class="hljs-comment">// Append the image to DOM.</span>
587
+ <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> barcodeResultItems) {
588
+ <span class="hljs-comment">// Print each barcode result to the console.</span>
589
+ <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Barcode: <span class="hljs-subst">${item.text}</span>, Format: <span class="hljs-subst">${item.formatString}</span>`</span>);
598
590
  }
599
591
  },
600
592
  });
@@ -658,7 +650,7 @@ settings.timeout = <span class="hljs-number">500</span>;
658
650
  <h3 id="2-edit-the-preset-templates-directly">2. Edit the preset templates directly</h3>
659
651
  <p>The preset templates have many more settings that can be customized to suit your use case best. If you <a href="https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/">download the SDK from Dynamsoft website</a>, you can find the templates under</p>
660
652
  <ul>
661
- <li>"/dynamsoft-barcode-reader-js-11.6.3000/dist/templates/"</li>
653
+ <li>"/dynamsoft-barcode-reader-js-11.6.3100/dist/templates/"</li>
662
654
  </ul>
663
655
  <p>Upon completing the template editing, you can invoke the <code>initSettings</code> method and provide it with the template path as an argument.</p>
664
656
  <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">await</span> cvRouter.initSettings(<span class="hljs-string">&quot;PATH-TO-THE-FILE&quot;</span>); <span class="hljs-comment">// E.g. &quot;https://your-website/ReadSingleBarcode.json&quot;)</span>
@@ -705,9 +697,7 @@ filter.setDuplicateForgetTime(<span class="hljs-string">&quot;barcode&quot;</spa
705
697
  <p>The following code snippet adds a "beep" sound for when a barcode is found:</p>
706
698
  <pre><code class="hljs js language-js"><span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
707
699
  resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
708
- <span class="hljs-keyword">if</span> (result.barcodeResultItems.length &gt; <span class="hljs-number">0</span>) {
709
- Dynamsoft.DCE.Feedback.beep();
710
- }
700
+ Dynamsoft.DCE.Feedback.beep();
711
701
  };
712
702
  <span class="hljs-keyword">await</span> cvRouter.addResultReceiver(resultReceiver);
713
703
  </code></pre>
@@ -732,7 +722,7 @@ uiElement.querySelector(<span class="hljs-string">&#x27;.dce-sel-resolution&#x27
732
722
  <h2 id="documentation">Documentation</h2>
733
723
  <h3 id="api-reference">API Reference</h3>
734
724
  <p>You can check out the detailed documentation about the APIs of the SDK at<br />
735
- <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3000">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3000</a>.</p>
725
+ <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100</a>.</p>
736
726
  <!-- Compatibility is basically not an issue. Pls remove to another place
737
727
 
738
728
  ## System Requirements
package/README.md CHANGED
@@ -34,7 +34,7 @@ The complete code of the "Hello World" example is shown below
34
34
  <body>
35
35
  <div id="camera-view-container" style="width: 100%; height: 60vh"></div>
36
36
  <textarea id="results" style="width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto" disabled></textarea>
37
- <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js"></script>
37
+ <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
38
38
  <script>
39
39
  Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
40
40
  Dynamsoft.Core.CoreModule.loadWasm();
@@ -48,11 +48,9 @@ The complete code of the "Hello World" example is shown below
48
48
 
49
49
  const resultsContainer = document.querySelector("#results");
50
50
  await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
51
- if (result.barcodeResultItems?.length) {
52
- resultsContainer.textContent = '';
53
- for (let item of result.barcodeResultItems) {
54
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
55
- }
51
+ resultsContainer.textContent = '';
52
+ for (let item of result.barcodeResultItems) {
53
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
56
54
  }
57
55
  }});
58
56
 
@@ -70,7 +68,7 @@ The complete code of the "Hello World" example is shown below
70
68
  ```
71
69
 
72
70
  <p align="center" style="text-align:center; white-space: normal; ">
73
- <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.30/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
71
+ <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v11.6.31/basics/hello-world.html" title="Code in Github" style="text-decoration:none;">
74
72
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
75
73
  </a>
76
74
  &nbsp;
@@ -78,7 +76,7 @@ The complete code of the "Hello World" example is shown below
78
76
  <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" >
79
77
  </a>
80
78
  &nbsp;
81
- <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.30&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
79
+ <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
82
80
  <img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
83
81
  </a>
84
82
  </p>
@@ -123,7 +121,7 @@ The complete code of the "Hello World" example is shown below
123
121
 
124
122
  ### Run the example
125
123
 
126
- You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.30&utm_source=npm) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/csm2f9wb/).
124
+ You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/basics/hello-world.html?ver=11.6.31&utm_source=npm) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/csm2f9wb/).
127
125
 
128
126
  You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.
129
127
 
@@ -137,7 +135,7 @@ Alternatively, you can test locally by copying and pasting the code shown above
137
135
  >
138
136
  > Regarding configuring https on your server, these guides for [nginx](https://nginx.org/en/docs/http/configuring_https_servers.html) / [IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) / [tomcat](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) / [nodejs](https://nodejs.org/docs/v0.4.1/api/tls.html) might help.
139
137
  >
140
- > If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=11.6.30&utm_source=npm&product=dbr&package=js).
138
+ > If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=11.6.31&utm_source=npm&product=dbr&package=js).
141
139
 
142
140
  ## Preparing the SDK
143
141
 
@@ -156,19 +154,19 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
156
154
  - jsDelivr
157
155
 
158
156
  ```html
159
- <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js"></script>
157
+ <script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
160
158
  ```
161
159
 
162
160
  - UNPKG
163
161
 
164
162
  ```html
165
- <script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js"></script>
163
+ <script src="https://unpkg.com/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
166
164
  ```
167
165
 
168
166
  <!-- - In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test.
169
167
 
170
168
  ```html
171
- <script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js"></script>
169
+ <script src="https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
172
170
  ```
173
171
 
174
172
  However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. -->
@@ -176,9 +174,9 @@ The simplest way to include the SDK is to use either the [jsDelivr](https://jsde
176
174
  - In frameworks like React, Vue and Angular, you may want to add the package as a dependency.
177
175
 
178
176
  ```sh
179
- npm i dynamsoft-barcode-reader-bundle@11.6.3000 -E
177
+ npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
180
178
  # or
181
- yarn add dynamsoft-barcode-reader-bundle@11.6.3000 -E
179
+ yarn add dynamsoft-barcode-reader-bundle@11.6.3100 -E
182
180
  ```
183
181
 
184
182
  NOTE that in frameworks, you need to [specify the location of the engine files](#2-optional-specify-the-location-of-the-engine-files).
@@ -191,14 +189,14 @@ Besides using the public CDN, you can also download the SDK and host its files o
191
189
 
192
190
  - From the website
193
191
 
194
- [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.30&utm_source=npm&product=dbr&package=js)
192
+ [Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=11.6.31&utm_source=npm&product=dbr&package=js)
195
193
 
196
194
  The resources are located at the path `dynamsoft-barcode-reader-js-{version-number}/dist/`.
197
195
 
198
196
  - From npm
199
197
 
200
198
  ```sh
201
- npm i dynamsoft-barcode-reader-bundle@11.6.3000 -E
199
+ npm i dynamsoft-barcode-reader-bundle@11.6.3100 -E
202
200
  ```
203
201
 
204
202
  The resources are located at the path `node_modules/<pkg>`, without `@<version>`. You must copy "dynamsoft-xxx" packages elsewhere and add `@<version>`. The `<version>` can be obtained from `package.json` of each package. Another thing to do is to [specify the engineResourcePaths](#2-optional-specify-the-location-of-the-engine-files) so that the SDK can correctly locate the resources.
@@ -207,7 +205,7 @@ Besides using the public CDN, you can also download the SDK and host its files o
207
205
  You can typically include SDK like this:
208
206
 
209
207
  ```html
210
- <script src="path/to/dynamsoft-barcode-reader-bundle@11.6.3000/dist/dbr.bundle.js"></script>
208
+ <script src="path/to/dynamsoft-barcode-reader-bundle@11.6.3100/dist/dbr.bundle.js"></script>
211
209
  ```
212
210
  <div class="multi-panel-end"></div>
213
211
 
@@ -239,7 +237,7 @@ To enable the SDK's functionality, you must provide a valid license. Utilize the
239
237
  Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9");
240
238
  ```
241
239
 
242
- As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.30&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.
240
+ As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=11.6.31&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.
243
241
 
244
242
  > Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.
245
243
 
@@ -331,12 +329,10 @@ Once the image processing is complete, the results are sent to all the registere
331
329
  const resultsContainer = document.querySelector("#results");
332
330
  const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
333
331
  resultReceiver.onDecodedBarcodesReceived = (result) => {
334
- if (result.barcodeResultItems?.length) {
335
- resultsContainer.textContent = '';
336
- for (let item of result.barcodeResultItems) {
337
- // In this example, the barcode results are displayed on the page below the video.
338
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
339
- }
332
+ resultsContainer.textContent = '';
333
+ for (let item of result.barcodeResultItems) {
334
+ // In this example, the barcode results are displayed on the page below the video.
335
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
340
336
  }
341
337
  };
342
338
  await cvRouter.addResultReceiver(resultReceiver);
@@ -347,12 +343,10 @@ You can also write code like this. It is the same.
347
343
  ```javascript
348
344
  const resultsContainer = document.querySelector("#results");
349
345
  await cvRouter.addResultReceiver({ onDecodedBarcodesReceived: (result) => {
350
- if (result.barcodeResultItems?.length) {
351
- resultsContainer.textContent = '';
352
- for (let item of result.barcodeResultItems) {
353
- // In this example, the barcode results are displayed on the page below the video.
354
- resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
355
- }
346
+ resultsContainer.textContent = '';
347
+ for (let item of result.barcodeResultItems) {
348
+ // In this example, the barcode results are displayed on the page below the video.
349
+ resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`;
356
350
  }
357
351
  }});
358
352
  ```
@@ -438,13 +432,11 @@ await cvRouter.addResultReceiver({
438
432
  onCapturedResultReceived: (result) => {
439
433
  //Check for barcode results
440
434
  let barcodeResultItems = result.items.filter((item) => item.type === EnumCRIT.CRIT_BARCODE);
441
- if (barcodeResultItems.length > 0) {
442
- let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image.
443
- if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM.
444
- for (let item of barcodeResultItems) {
445
- // Print each barcode result to the console.
446
- console.log(`Barcode: ${item.text}, Format: ${item.formatString}`);
447
- }
435
+ let image = result.items.filter((item) => item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE)[0]?.imageData; // Retrieve the original image.
436
+ if (image) document.body.appendChild(image.toCanvas()); // Append the image to DOM.
437
+ for (let item of barcodeResultItems) {
438
+ // Print each barcode result to the console.
439
+ console.log(`Barcode: ${item.text}, Format: ${item.formatString}`);
448
440
  }
449
441
  },
450
442
  });
@@ -526,7 +518,7 @@ await cvRouter.startCapturing("ReadSingleBarcode");
526
518
 
527
519
  The preset templates have many more settings that can be customized to suit your use case best. If you [download the SDK from Dynamsoft website](https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/), you can find the templates under
528
520
 
529
- * "/dynamsoft-barcode-reader-js-11.6.3000/dist/templates/"
521
+ * "/dynamsoft-barcode-reader-js-11.6.3100/dist/templates/"
530
522
 
531
523
  Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument.
532
524
 
@@ -594,9 +586,7 @@ The following code snippet adds a "beep" sound for when a barcode is found:
594
586
  ```js
595
587
  const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver();
596
588
  resultReceiver.onDecodedBarcodesReceived = (result) => {
597
- if (result.barcodeResultItems.length > 0) {
598
- Dynamsoft.DCE.Feedback.beep();
599
- }
589
+ Dynamsoft.DCE.Feedback.beep();
600
590
  };
601
591
  await cvRouter.addResultReceiver(resultReceiver);
602
592
  ```
@@ -628,7 +618,7 @@ The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on ho
628
618
  ### API Reference
629
619
 
630
620
  You can check out the detailed documentation about the APIs of the SDK at
631
- [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3000](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3000).
621
+ [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=11.6.3100).
632
622
 
633
623
  <!-- Compatibility is basically not an issue. Pls remove to another place
634
624
 
@@ -3515,6 +3515,15 @@ declare class Camera {
3515
3515
  static _bReopenWhenChangeResolution: boolean;
3516
3516
  _bTryAnotherCameraWhenFailToOpen: boolean;
3517
3517
  _constraints4Fallback: MediaTrackConstraints | true;
3518
+ static _dynamsoftExports: any;
3519
+ /**
3520
+ * In the UI definition file, you can import SDK variables through this interface.
3521
+ */
3522
+ dynamsoftExports: any;
3523
+ /**
3524
+ * You can use this interface to share variables between business logic and UI definition files.
3525
+ */
3526
+ uiContext: any;
3518
3527
  static _arrConstructors: CameraZsFunc[];
3519
3528
  static _arrOnOpen: CameraZsFunc[];
3520
3529
  static _arrBeforeClose: CameraZsFunc[];
@@ -3539,6 +3548,12 @@ declare class Camera {
3539
3548
  * If `value` is a falsy value, `coreShell` is used as `ui`.
3540
3549
  **/
3541
3550
  set ui(value: HTMLElement | DocumentFragment | string | undefined);
3551
+ /**
3552
+ * Compare to `camera.ui = xxx`,
3553
+ * 1. accept url string as value
3554
+ * 2. accept nested tag `<UIInclude src='xxx'>`
3555
+ */
3556
+ setUIAsync(value: HTMLElement | DocumentFragment | string | undefined): Promise<void>;
3542
3557
  /**
3543
3558
  * "closed" | "opening" | "opened" | "paused" | "closing"
3544
3559
  */
@@ -3916,6 +3931,18 @@ declare const stringToHtml: (str: string, config?: {
3916
3931
  internalCss2Blob: boolean;
3917
3932
  insertInternalCss2ExistedSheet?: boolean;
3918
3933
  }) => Node;
3934
+ /**
3935
+ * Return `Element` if possible, otherwise return `DocumentFragment`.
3936
+ *
3937
+ * Compare to `stringToHtml`,
3938
+ * 1. accept url string as value
3939
+ * 2. accept nested tag `<UIInclude src='xxx'>`
3940
+ */
3941
+ declare const toHtmlAsync: (value: HTMLElement | DocumentFragment | string, config?: {
3942
+ inlineScript2Blob?: boolean;
3943
+ internalCss2Blob: boolean;
3944
+ insertInternalCss2ExistedSheet?: boolean;
3945
+ }) => Promise<Node>;
3919
3946
 
3920
3947
  declare class FramePipeline {
3921
3948
  camera?: Camera;
@@ -4164,11 +4191,11 @@ declare namespace Camera {
4164
4191
  isBufferEmpty(): boolean;
4165
4192
  startFetching(): void;
4166
4193
  _pixelFormat: number;
4167
- getPixelFormat(): number;
4168
- setPixelFormat(format: number): void;
4194
+ getPixelFormat(): EnumImagePixelFormat;
4195
+ setPixelFormat(format: EnumImagePixelFormat): void;
4169
4196
  _colourChannelUsageType: number;
4170
- setColourChannelUsageType(format: number): void;
4171
- getColourChannelUsageType(): number;
4197
+ setColourChannelUsageType(format: EnumColourChannelUsageType): void;
4198
+ getColourChannelUsageType(): EnumColourChannelUsageType;
4172
4199
  setScanRegion(region?: {
4173
4200
  x: number;
4174
4201
  y: number;
@@ -4575,7 +4602,7 @@ declare class ImageDrawingItem extends DrawingItem {
4575
4602
  width: number;
4576
4603
  height: number;
4577
4604
  }, maintainAspectRatio: boolean, drawingStyleId?: any);
4578
- getImage(): HTMLVideoElement | HTMLCanvasElement | HTMLImageElement;
4605
+ getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
4579
4606
  setImage(image: {
4580
4607
  bytes: Uint8Array;
4581
4608
  width: number;
@@ -4643,16 +4670,6 @@ declare enum EnumEnhancedFeatures {
4643
4670
  */
4644
4671
  EF_TAP_TO_FOCUS = 64
4645
4672
  }
4646
- declare enum EnumPixelFormat {
4647
- GREY = "grey",
4648
- GREY32 = "grey32",
4649
- RGBA = "rgba",
4650
- RBGA = "rbga",
4651
- GRBA = "grba",
4652
- GBRA = "gbra",
4653
- BRGA = "brga",
4654
- BGRA = "bgra"
4655
- }
4656
4673
  interface Resolution {
4657
4674
  width: number;
4658
4675
  height: number;
@@ -4718,7 +4735,73 @@ interface Note {
4718
4735
  /** The content of the note, can be of any type. */
4719
4736
  content: any;
4720
4737
  }
4738
+ declare enum EnumColourChannelUsageType {
4739
+ /**
4740
+ * Automatically determines how color channels are used.
4741
+ * This option allows the SDK to choose the most appropriate channel usage mode dynamically.
4742
+ */
4743
+ CCUT_AUTO = 0,
4744
+ /**
4745
+ * Utilizes all available color channels in the image for processing.
4746
+ * This mode is ideal for scenarios where full color information is necessary for accurate analysis or processing.
4747
+ */
4748
+ CCUT_FULL_CHANNEL = 1,
4749
+ /**
4750
+ * Processes images using only the Y (luminance) channel, specifically in NV21 format images.
4751
+ * This mode is useful for operations that require analyzing the brightness or intensity of the image while ignoring color information.
4752
+ */
4753
+ CCUT_Y_CHANNEL_ONLY = 2,
4754
+ /**
4755
+ * Uses only the red color channel for processing in RGB images.
4756
+ * This mode is useful for tasks that require analysis or manipulation based on the red component of the image.
4757
+ */
4758
+ CCUT_RGB_R_CHANNEL_ONLY = 3,
4759
+ /**
4760
+ * Uses only the green color channel for processing in RGB images.
4761
+ * This mode is useful for tasks where the green component is most relevant.
4762
+ */
4763
+ CCUT_RGB_G_CHANNEL_ONLY = 4,
4764
+ /**
4765
+ * Uses only the blue color channel for processing in RGB images.
4766
+ * This mode is useful for tasks where the blue component is of particular interest.
4767
+ */
4768
+ CCUT_RGB_B_CHANNEL_ONLY = 5
4769
+ }
4770
+ declare enum EnumImagePixelFormat {
4771
+ /** Binary format representing images with two colors: 0 for black and 1 for white. */
4772
+ IPF_BINARY = 0,
4773
+ /** Inverted binary format with 0 for white and 1 for black. */
4774
+ IPF_BINARYINVERTED = 1,
4775
+ /** Grayscale format with 8 bits per pixel, allowing for 256 shades of gray. */
4776
+ IPF_GRAYSCALED = 2,
4777
+ /** NV21 format, a YUV planar format used commonly in camera preview and video encoding, with 8-bit Y followed by interleaved V/U values. */
4778
+ IPF_NV21 = 3,
4779
+ /** RGB format with 5 bits for red and blue, and 6 bits for green, stored in a 16-bit structure. */
4780
+ IPF_RGB_565 = 4,
4781
+ /** Similar to RGB_565 but with 5 bits for each color channel, providing uniform color depth across channels in a 16-bit structure. */
4782
+ IPF_RGB_555 = 5,
4783
+ /** Standard 24-bit RGB format with 8 bits per channel. */
4784
+ IPF_RGB_888 = 6,
4785
+ /** 32-bit ARGB format with 8 bits per channel, including an alpha channel for transparency. */
4786
+ IPF_ARGB_8888 = 7,
4787
+ /** High-depth 48-bit RGB format with 16 bits per channel. */
4788
+ IPF_RGB_161616 = 8,
4789
+ /** 64-bit ARGB format with 16 bits per channel, including an alpha channel. */
4790
+ IPF_ARGB_16161616 = 9,
4791
+ /** 32-bit ABGR format with 8 bits per channel, storing color information in reverse order of ARGB_8888. */
4792
+ IPF_ABGR_8888 = 10,
4793
+ /** 64-bit ABGR format with 16 bits per channel, providing high color depth and transparency in the reverse order of ARGB_16161616. */
4794
+ IPF_ABGR_16161616 = 11,
4795
+ /** 24-bit BGR format with 8 bits per channel, where the blue channel is stored first. */
4796
+ IPF_BGR_888 = 12,
4797
+ /** Binary format with 8 bits per pixel, enabling more detailed binary images by allowing for antialiasing or other binary representations. */
4798
+ IPF_BINARY_8 = 13,
4799
+ /** NV12 format, similar to NV21 but with the U and V color components swapped. */
4800
+ IPF_NV12 = 14,
4801
+ /** Inverted binary format with 8 bits per pixel. */
4802
+ IPF_BINARY_8_INVERTED = 15
4803
+ }
4721
4804
 
4722
- export { Beep, Camera, CameraEnhancer, CameraEnhancerModule, CameraView, DrawingItem, DrawingLayer, DrawingStyleManager, EnumDrawingItemMediaType, EnumDrawingItemState, EnumEnhancedFeatures, EnumPixelFormat, Feedback, FramePipeline, ImageDrawingItem, LineDrawingItem, QuadDrawingItem, RectDrawingItem, TextDrawingItem, _bufferToCanvas, _distToSegment, _isPointInPolygon, beep, stringToHtml, vibrate };
4805
+ export { Beep, Camera, CameraEnhancer, CameraEnhancerModule, CameraView, DrawingItem, DrawingLayer, DrawingStyleManager, EnumDrawingItemMediaType, EnumDrawingItemState, EnumEnhancedFeatures, Feedback, FramePipeline, ImageDrawingItem, LineDrawingItem, QuadDrawingItem, RectDrawingItem, TextDrawingItem, _bufferToCanvas, _distToSegment, _isPointInPolygon, beep, stringToHtml, toHtmlAsync, vibrate };
4723
4806
  export type { CameraInfo, CameraPreset, CameraStatus, CameraZsFunc, DCEFrame, DMMoreMediaTrackCapabilities, DrawingStyle, Note, PlayCallbackInfo, Resolution, TipConfig, VideoDeviceInfo, VideoFrameTag };
4724
4807