barkoder-nativescript 1.6.4 → 1.6.7
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/barkoder-nativescript.android.ts +363 -5
- package/barkoder-nativescript.common.ts +11 -3
- package/barkoder-nativescript.ios.ts +354 -4
- package/package.json +1 -1
- package/platforms/android/barkoder.aar +0 -0
- package/platforms/ios/Barkoder.xcframework/Info.plist +5 -5
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Headers/iBarkoder.h +36 -4
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/metadata.json +77 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.net +5331 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.shape +1740 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_384x256_int8.mlmodelc/neural_network_optionals/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/metadata.json +77 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.net +5331 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.shape +1740 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/n2_512x384_int8.mlmodelc/neural_network_optionals/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Barkoder +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Headers/iBarkoder.h +36 -4
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/Info.plist +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/_CodeSignature/CodeResources +119 -53
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/default.metallib +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/metadata.json +77 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.net +5331 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.shape +1740 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_384x256_int8.mlmodelc/neural_network_optionals/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/metadata.json +77 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/model/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.net +5331 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.shape +1740 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/model.espresso.weights +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/n2_512x384_int8.mlmodelc/neural_network_optionals/coremldata.bin +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +116 -12
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.abi.json +2507 -1044
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64/BarkoderSDK.framework/templates.json +32 -23
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/BarkoderSDK +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Headers/BarkoderSDK-Swift.h +232 -24
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Info.plist +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2507 -1044
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2507 -1044
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/Modules/BarkoderSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +54 -4
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/_CodeSignature/CodeResources +25 -25
- package/platforms/ios/BarkoderSDK.xcframework/ios-arm64_x86_64-simulator/BarkoderSDK.framework/templates.json +32 -23
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +0 -88
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +0 -88
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/metadata.json +0 -88
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_384x256.mlmodelc/weights/weight.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/analytics/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/coremldata.bin +0 -0
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/metadata.json +0 -88
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/model.mil +0 -753
- package/platforms/ios/Barkoder.xcframework/ios-arm64_x86_64-simulator/Barkoder.framework/float16_512x384.mlmodelc/weights/weight.bin +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BarkoderConstants } from "./barkoder-nativescript.common";
|
|
2
|
-
import { View } from "@nativescript/core";
|
|
2
|
+
import { Color, View } from "@nativescript/core";
|
|
3
3
|
import { ios } from "@nativescript/core/application";
|
|
4
|
+
import { ImageSource } from '@nativescript/core';
|
|
5
|
+
import { Utils } from '@nativescript/core';
|
|
4
6
|
|
|
5
7
|
export class BarkoderViewIOS extends View {
|
|
6
8
|
public bkdView: any;
|
|
@@ -93,6 +95,10 @@ export class BarkoderViewIOS extends View {
|
|
|
93
95
|
this.bkdView.setFlash(enabled);
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
captureImage(): void {
|
|
99
|
+
this.bkdView.captureImage();
|
|
100
|
+
}
|
|
101
|
+
|
|
96
102
|
/**
|
|
97
103
|
* Retrieves the maximum available zoom factor for the device's camera
|
|
98
104
|
*/
|
|
@@ -442,6 +448,8 @@ export class BarkoderViewIOS extends View {
|
|
|
442
448
|
this.bkdView.config.decoderConfig.decodingSpeed = 1;
|
|
443
449
|
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Slow) {
|
|
444
450
|
this.bkdView.config.decoderConfig.decodingSpeed = 2;
|
|
451
|
+
} else if (decodingSpeed == BarkoderConstants.DecodingSpeed.Rigorous) {
|
|
452
|
+
this.bkdView.config.decoderConfig.decodingSpeed = 3;
|
|
445
453
|
}
|
|
446
454
|
}
|
|
447
455
|
|
|
@@ -462,6 +470,9 @@ export class BarkoderViewIOS extends View {
|
|
|
462
470
|
case BarkoderConstants.FormattingType.AAMVA:
|
|
463
471
|
this.bkdView.config.decoderConfig.formatting = 3;
|
|
464
472
|
break;
|
|
473
|
+
case BarkoderConstants.FormattingType.SADL:
|
|
474
|
+
this.bkdView.config.decoderConfig.formatting = 4;
|
|
475
|
+
break;
|
|
465
476
|
}
|
|
466
477
|
}
|
|
467
478
|
|
|
@@ -608,6 +619,32 @@ export class BarkoderViewIOS extends View {
|
|
|
608
619
|
return this.bkdView.config.decoderConfig.kix.enabled;
|
|
609
620
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
610
621
|
return this.bkdView.config.decoderConfig.japanasePost.enabled;
|
|
622
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
623
|
+
return this.bkdView.config.decoderConfig.maxiCode.enabled;
|
|
624
|
+
case BarkoderConstants.DecoderType.OCRText:
|
|
625
|
+
return this.bkdView.config.decoderConfig.ocrText.enabled;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
getSadlImageFromExtra(extra: any): ImageSource | null {
|
|
630
|
+
if (!extra) {
|
|
631
|
+
return null;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
try {
|
|
635
|
+
const uiImage = BarkoderHelper.sadlImage(extra);
|
|
636
|
+
|
|
637
|
+
if (!uiImage) {
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
const imageSource = new ImageSource();
|
|
642
|
+
imageSource.setNativeSource(uiImage); // ✅ assign UIImage directly
|
|
643
|
+
return imageSource;
|
|
644
|
+
|
|
645
|
+
} catch (e) {
|
|
646
|
+
console.error('iOS SADL image failed:', e);
|
|
647
|
+
return null;
|
|
611
648
|
}
|
|
612
649
|
}
|
|
613
650
|
|
|
@@ -654,6 +691,8 @@ export class BarkoderViewIOS extends View {
|
|
|
654
691
|
this.bkdView.config.decoderConfig.royalMail.enabled = false;
|
|
655
692
|
this.bkdView.config.decoderConfig.kix.enabled = false;
|
|
656
693
|
this.bkdView.config.decoderConfig.japanesePost.enabled = false;
|
|
694
|
+
this.bkdView.config.decoderConfig.maxiCode.enabled = false;
|
|
695
|
+
this.bkdView.config.decoderConfig.ocrText.enabled = false;
|
|
657
696
|
decoders.forEach((dt: BarkoderConstants.DecoderType) => {
|
|
658
697
|
switch (dt) {
|
|
659
698
|
case BarkoderConstants.DecoderType.Aztec:
|
|
@@ -770,6 +809,12 @@ export class BarkoderViewIOS extends View {
|
|
|
770
809
|
case BarkoderConstants.DecoderType.JapanesePost:
|
|
771
810
|
this.bkdView.config.decoderConfig.japanesePost.enabled = true;
|
|
772
811
|
break;
|
|
812
|
+
case BarkoderConstants.DecoderType.MaxiCode:
|
|
813
|
+
this.bkdView.config.decoderConfig.maxiCode.enabled = true;
|
|
814
|
+
break;
|
|
815
|
+
case BarkoderConstants.DecoderType.OCRText:
|
|
816
|
+
this.bkdView.config.decoderConfig.ocrText.enabled = true;
|
|
817
|
+
break;
|
|
773
818
|
default:
|
|
774
819
|
break;
|
|
775
820
|
}
|
|
@@ -1141,6 +1186,26 @@ export class BarkoderViewIOS extends View {
|
|
|
1141
1186
|
return this.bkdView.config.decoderConfig.maximumResultsCount;
|
|
1142
1187
|
}
|
|
1143
1188
|
|
|
1189
|
+
setARImageResultEnabled(enabled: boolean): void {
|
|
1190
|
+
this.bkdView.config.arConfig.imageResultEnabled = enabled
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
setARBarcodeThumbnailOnResultEnabled(enabled: boolean): void {
|
|
1194
|
+
this.bkdView.config.arConfig.barcodeThumbnailOnResult = enabled
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
isARImageResultEnabled(): any {
|
|
1198
|
+
return this.bkdView.config.arConfig.imageResultEnabled
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
isARBarcodeThumbnailOnResultEnabled(): any {
|
|
1202
|
+
return this.bkdView.config.arConfig.barcodeThumbnailOnResult
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
getCurrentZoomFactor(): any {
|
|
1206
|
+
return this.bkdView.getCurrentZoomFactor()
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1144
1209
|
/**
|
|
1145
1210
|
* Sets whether the deblurring feature for UPC/EAN barcodes is enabled
|
|
1146
1211
|
*/
|
|
@@ -1283,6 +1348,10 @@ export class BarkoderViewIOS extends View {
|
|
|
1283
1348
|
this.bkdView.config.decoderConfig.setcustomOptionValue(string, mode)
|
|
1284
1349
|
}
|
|
1285
1350
|
|
|
1351
|
+
setCustomOptionGlobal(string: string, mode: number): void {
|
|
1352
|
+
this.bkdView.config.decoderConfig.setcustomOptionValue(string, mode)
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1286
1355
|
setLicenseKey(licenseKey: string): void {
|
|
1287
1356
|
const config = new BarkoderConfig({
|
|
1288
1357
|
licenseKey: licenseKey,
|
|
@@ -1454,6 +1523,236 @@ export class BarkoderViewIOS extends View {
|
|
|
1454
1523
|
setResultDisappearanceDelayMs(ms : number) : void {
|
|
1455
1524
|
this.bkdView.config.arConfig.resultDisappearanceDelayMs = ms
|
|
1456
1525
|
}
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
configureFlashButton(
|
|
1531
|
+
visible: boolean,
|
|
1532
|
+
position: number[], // [xDp, yDp]
|
|
1533
|
+
iconSize: number,
|
|
1534
|
+
tintColor: string | Color | null,
|
|
1535
|
+
backgroundColor: string | Color | null,
|
|
1536
|
+
cornerRadius: number,
|
|
1537
|
+
padding: number,
|
|
1538
|
+
useCustomIcon: boolean,
|
|
1539
|
+
flashOnIconBase64: string,
|
|
1540
|
+
flashOffIconBase64: string
|
|
1541
|
+
): void {
|
|
1542
|
+
if (!this.bkdView) {
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// ✅ Null-safe conversion of tintColor
|
|
1547
|
+
const nativeTintColor = tintColor != null
|
|
1548
|
+
? (tintColor instanceof Color
|
|
1549
|
+
? tintColor
|
|
1550
|
+
: new Color(tintColor as string)).ios
|
|
1551
|
+
: null;
|
|
1552
|
+
|
|
1553
|
+
// ✅ Null-safe conversion of backgroundColor
|
|
1554
|
+
const nativeBackgroundColor = backgroundColor != null
|
|
1555
|
+
? (backgroundColor instanceof Color
|
|
1556
|
+
? backgroundColor
|
|
1557
|
+
: new Color(backgroundColor as string)).ios
|
|
1558
|
+
: null;
|
|
1559
|
+
|
|
1560
|
+
// 2. Convert Position (JS number[] -> native CGPoint structure, wrapped in NSValue)
|
|
1561
|
+
const cgPoint: CGPoint = { x: position[0], y: position[1] };
|
|
1562
|
+
const nativePosition = NSValue.valueWithCGPoint(cgPoint);
|
|
1563
|
+
|
|
1564
|
+
// 3. Convert Base64 Strings to native UIImage
|
|
1565
|
+
let nativeFlashOnImage: UIImage = null;
|
|
1566
|
+
let nativeFlashOffImage: UIImage = null;
|
|
1567
|
+
|
|
1568
|
+
if (useCustomIcon) {
|
|
1569
|
+
nativeFlashOnImage = this.decodeBase64ToImage(flashOnIconBase64);
|
|
1570
|
+
nativeFlashOffImage = this.decodeBase64ToImage(flashOffIconBase64);
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
// 4. Call the native Swift/ObjC method
|
|
1574
|
+
this.bkdView.configureFlashButtonWithVisiblePositionIconSizeTintColorBackgroundColorCornerRadiusPaddingUseCustomIconCustomIconFlashOnCustomIconFlashOff(
|
|
1575
|
+
visible,
|
|
1576
|
+
nativePosition,
|
|
1577
|
+
iconSize,
|
|
1578
|
+
nativeTintColor,
|
|
1579
|
+
nativeBackgroundColor,
|
|
1580
|
+
cornerRadius,
|
|
1581
|
+
padding,
|
|
1582
|
+
useCustomIcon,
|
|
1583
|
+
nativeFlashOnImage,
|
|
1584
|
+
nativeFlashOffImage
|
|
1585
|
+
);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
// --- Helper Method Definition (iOS equivalent of decodeBase64ToBitmap) ---
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
configureCloseButton(
|
|
1593
|
+
visible: boolean,
|
|
1594
|
+
position: number[],
|
|
1595
|
+
iconSize: number,
|
|
1596
|
+
tintColor: string | Color | null,
|
|
1597
|
+
backgroundColor: string | Color | null,
|
|
1598
|
+
cornerRadius: number,
|
|
1599
|
+
padding: number,
|
|
1600
|
+
useCustomIcon: boolean,
|
|
1601
|
+
customIcon: string,
|
|
1602
|
+
onClose?: () => void
|
|
1603
|
+
): void {
|
|
1604
|
+
if (!this.bkdView) {
|
|
1605
|
+
return;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// ✅ Safely handle nullable tintColor
|
|
1609
|
+
const nativeTintColor = tintColor != null
|
|
1610
|
+
? (tintColor instanceof Color
|
|
1611
|
+
? tintColor
|
|
1612
|
+
: new Color(tintColor as string)).ios
|
|
1613
|
+
: null;
|
|
1614
|
+
|
|
1615
|
+
// ✅ Safely handle nullable backgroundColor
|
|
1616
|
+
const nativeBackgroundColor = backgroundColor != null
|
|
1617
|
+
? (backgroundColor instanceof Color
|
|
1618
|
+
? backgroundColor
|
|
1619
|
+
: new Color(backgroundColor as string)).ios
|
|
1620
|
+
: null;
|
|
1621
|
+
|
|
1622
|
+
const cgPoint: CGPoint = { x: position[0], y: position[1] };
|
|
1623
|
+
const nativePosition = NSValue.valueWithCGPoint(cgPoint);
|
|
1624
|
+
|
|
1625
|
+
let customIconImage: UIImage = null;
|
|
1626
|
+
if (useCustomIcon) {
|
|
1627
|
+
customIconImage = this.decodeBase64ToImage(customIcon);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
const nativeOnClose = onClose ? () => {
|
|
1631
|
+
onClose();
|
|
1632
|
+
} : null;
|
|
1633
|
+
|
|
1634
|
+
this.bkdView.configureCloseButtonWithVisiblePositionIconSizeTintColorBackgroundColorCornerRadiusPaddingUseCustomIconCustomIconOnClose(
|
|
1635
|
+
visible,
|
|
1636
|
+
nativePosition,
|
|
1637
|
+
iconSize,
|
|
1638
|
+
nativeTintColor,
|
|
1639
|
+
nativeBackgroundColor,
|
|
1640
|
+
cornerRadius,
|
|
1641
|
+
padding,
|
|
1642
|
+
useCustomIcon,
|
|
1643
|
+
customIconImage,
|
|
1644
|
+
nativeOnClose
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
configureZoomButton(
|
|
1653
|
+
visible: boolean,
|
|
1654
|
+
position: number[], // [xDp, yDp]
|
|
1655
|
+
iconSize: number,
|
|
1656
|
+
tintColor: string | Color | null,
|
|
1657
|
+
backgroundColor: string | Color | null,
|
|
1658
|
+
cornerRadius: number,
|
|
1659
|
+
padding: number,
|
|
1660
|
+
useCustomIcon: boolean,
|
|
1661
|
+
zoomInIconBase64: string,
|
|
1662
|
+
zoomOutIconBase64: string,
|
|
1663
|
+
zoomedInFactor: number,
|
|
1664
|
+
zoomedOutFactor: number
|
|
1665
|
+
): void {
|
|
1666
|
+
if (!this.bkdView) {
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
// ✅ 1. Null-safe conversion of tintColor
|
|
1671
|
+
const nativeTintColor = tintColor != null
|
|
1672
|
+
? (tintColor instanceof Color
|
|
1673
|
+
? tintColor
|
|
1674
|
+
: new Color(tintColor as string)).ios
|
|
1675
|
+
: null;
|
|
1676
|
+
|
|
1677
|
+
// ✅ 2. Null-safe conversion of backgroundColor
|
|
1678
|
+
const nativeBackgroundColor = backgroundColor != null
|
|
1679
|
+
? (backgroundColor instanceof Color
|
|
1680
|
+
? backgroundColor
|
|
1681
|
+
: new Color(backgroundColor as string)).ios
|
|
1682
|
+
: null;
|
|
1683
|
+
|
|
1684
|
+
// 3. Convert Position (JS number[] -> native CGPoint, wrapped in NSValue)
|
|
1685
|
+
const cgPoint: CGPoint = { x: position[0], y: position[1] };
|
|
1686
|
+
const nativePosition = NSValue.valueWithCGPoint(cgPoint);
|
|
1687
|
+
|
|
1688
|
+
// 4. Convert Base64 Strings to native UIImage
|
|
1689
|
+
let nativeZoomInImage: UIImage = null;
|
|
1690
|
+
let nativeZoomOutImage: UIImage = null;
|
|
1691
|
+
|
|
1692
|
+
if (useCustomIcon) {
|
|
1693
|
+
nativeZoomInImage = this.decodeBase64ToImage(zoomInIconBase64);
|
|
1694
|
+
nativeZoomOutImage = this.decodeBase64ToImage(zoomOutIconBase64);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
// 5. Call the native iOS method
|
|
1698
|
+
this.bkdView.configureZoomButtonWithVisiblePositionIconSizeTintColorBackgroundColorCornerRadiusPaddingUseCustomIconCustomIconZoomedInCustomIconZoomedOutZoomedInFactorZoomedOutFactor(
|
|
1699
|
+
visible,
|
|
1700
|
+
nativePosition,
|
|
1701
|
+
iconSize,
|
|
1702
|
+
nativeTintColor,
|
|
1703
|
+
nativeBackgroundColor,
|
|
1704
|
+
cornerRadius,
|
|
1705
|
+
padding,
|
|
1706
|
+
useCustomIcon,
|
|
1707
|
+
nativeZoomInImage,
|
|
1708
|
+
nativeZoomOutImage,
|
|
1709
|
+
zoomedInFactor,
|
|
1710
|
+
zoomedOutFactor
|
|
1711
|
+
);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
// --- Required Helper Method (Must be defined in your class) ---
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Decodes a Base64 string into a native UIImage object.
|
|
1719
|
+
* This is the iOS equivalent of decodeBase64ToBitmap used in Android.
|
|
1720
|
+
*/
|
|
1721
|
+
private decodeBase64ToImage(base64String: string): UIImage {
|
|
1722
|
+
if (!base64String) {
|
|
1723
|
+
return null;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
// Remove potential header (e.g., "data:image/png;base64,")
|
|
1727
|
+
const cleanString = base64String.replace(/^data:image\/(png|jpeg);base64,/, '');
|
|
1728
|
+
|
|
1729
|
+
// Convert Base64 string to NSData
|
|
1730
|
+
const nsData = NSData.alloc().initWithBase64EncodedStringOptions(
|
|
1731
|
+
cleanString,
|
|
1732
|
+
NSDataBase64DecodingOptions.NSDataBase64DecodingIgnoreUnknownCharacters
|
|
1733
|
+
);
|
|
1734
|
+
|
|
1735
|
+
if (nsData) {
|
|
1736
|
+
// Convert NSData to UIImage
|
|
1737
|
+
return UIImage.imageWithData(nsData);
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
return null;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
setARResultLimit(resultLimit: number): void {
|
|
1746
|
+
this.bkdView.config.arConfig.resultLimit = resultLimit
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
setARContinueScanningOnLimit(enabled: boolean): void {
|
|
1750
|
+
this.bkdView.config.arConfig.continueScanningOnLimit = enabled
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
setAREmitResultsAtSessionEndOnly(enabled: boolean): void {
|
|
1754
|
+
this.bkdView.config.arConfig.emitResultsAtSessionEndOnly = enabled
|
|
1755
|
+
}
|
|
1457
1756
|
|
|
1458
1757
|
getResultDisappearanceDelayMs(): any {
|
|
1459
1758
|
return this.bkdView.config.arConfig.resultDisappearanceDelayMs
|
|
@@ -1544,13 +1843,64 @@ export class BarkoderViewWraper extends UIResponder
|
|
|
1544
1843
|
|
|
1545
1844
|
scanningFinishedThumbnailsImage(
|
|
1546
1845
|
decoderResults: NSArray<DecoderResult> | DecoderResult[],
|
|
1547
|
-
thumbnails: NSArray<UIImage> | UIImage[],
|
|
1548
|
-
image: UIImage
|
|
1846
|
+
thumbnails: NSArray<UIImage> | UIImage[] | null,
|
|
1847
|
+
image: UIImage | null
|
|
1549
1848
|
): void {
|
|
1550
|
-
|
|
1849
|
+
const jsThumbnails: ImageSource[] = [];
|
|
1850
|
+
|
|
1851
|
+
// Convert thumbnails
|
|
1852
|
+
if (thumbnails instanceof NSArray) {
|
|
1853
|
+
for (let i = 0; i < thumbnails.count; i++) {
|
|
1854
|
+
const uiImage = thumbnails.objectAtIndex(i);
|
|
1855
|
+
const imgSrc = new ImageSource();
|
|
1856
|
+
imgSrc.setNativeSource(uiImage);
|
|
1857
|
+
jsThumbnails.push(imgSrc);
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
const jsResults: any[] = [];
|
|
1862
|
+
|
|
1863
|
+
if (decoderResults instanceof NSArray) {
|
|
1864
|
+
for (let i = 0; i < decoderResults.count; i++) {
|
|
1865
|
+
const result = decoderResults.objectAtIndex(i);
|
|
1866
|
+
jsResults.push(this._convertResult(result));
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
// Convert image
|
|
1871
|
+
let convertedImage: ImageSource | null = null;
|
|
1872
|
+
if (image) {
|
|
1873
|
+
convertedImage = new ImageSource();
|
|
1874
|
+
convertedImage.setNativeSource(image);
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
// Fire JS callback
|
|
1878
|
+
this.callback.scanningFinished(jsResults, jsThumbnails, convertedImage);
|
|
1551
1879
|
}
|
|
1552
1880
|
|
|
1553
1881
|
static new(): BarkoderViewWraper {
|
|
1554
1882
|
return super.new.call(this);
|
|
1555
1883
|
}
|
|
1884
|
+
|
|
1885
|
+
private _convertResult(result: any): any {
|
|
1886
|
+
const extras: { key: string; value: string }[] = [];
|
|
1887
|
+
|
|
1888
|
+
if (result.extra && result.extra.allKeys) {
|
|
1889
|
+
const keys = result.extra.allKeys;
|
|
1890
|
+
for (let i = 0; i < keys.count; i++) {
|
|
1891
|
+
const key = keys.objectAtIndex(i);
|
|
1892
|
+
const value = result.extra.objectForKey(key);
|
|
1893
|
+
extras.push({
|
|
1894
|
+
key: key.toString(),
|
|
1895
|
+
value: value?.toString?.() ?? '',
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
return {
|
|
1901
|
+
textualData: result.textualData,
|
|
1902
|
+
extra: extras,
|
|
1903
|
+
// add other fields if needed (e.g., barcodeType, location, etc.)
|
|
1904
|
+
};
|
|
1905
|
+
}
|
|
1556
1906
|
}
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -8,32 +8,32 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>Barkoder.framework/Barkoder</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>Barkoder.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
+
<string>x86_64</string>
|
|
17
18
|
</array>
|
|
18
19
|
<key>SupportedPlatform</key>
|
|
19
20
|
<string>ios</string>
|
|
21
|
+
<key>SupportedPlatformVariant</key>
|
|
22
|
+
<string>simulator</string>
|
|
20
23
|
</dict>
|
|
21
24
|
<dict>
|
|
22
25
|
<key>BinaryPath</key>
|
|
23
26
|
<string>Barkoder.framework/Barkoder</string>
|
|
24
27
|
<key>LibraryIdentifier</key>
|
|
25
|
-
<string>ios-
|
|
28
|
+
<string>ios-arm64</string>
|
|
26
29
|
<key>LibraryPath</key>
|
|
27
30
|
<string>Barkoder.framework</string>
|
|
28
31
|
<key>SupportedArchitectures</key>
|
|
29
32
|
<array>
|
|
30
33
|
<string>arm64</string>
|
|
31
|
-
<string>x86_64</string>
|
|
32
34
|
</array>
|
|
33
35
|
<key>SupportedPlatform</key>
|
|
34
36
|
<string>ios</string>
|
|
35
|
-
<key>SupportedPlatformVariant</key>
|
|
36
|
-
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
</array>
|
|
39
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -73,7 +73,9 @@ typedef enum {
|
|
|
73
73
|
AustralianPost,
|
|
74
74
|
RoyalMail,
|
|
75
75
|
KIX,
|
|
76
|
-
JapanesePost
|
|
76
|
+
JapanesePost,
|
|
77
|
+
MaxiCode,
|
|
78
|
+
OCRText
|
|
77
79
|
|
|
78
80
|
} DecoderType;
|
|
79
81
|
|
|
@@ -308,6 +310,13 @@ typedef enum {
|
|
|
308
310
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
309
311
|
@end
|
|
310
312
|
|
|
313
|
+
//==========================================================================
|
|
314
|
+
// MaxiCode Config
|
|
315
|
+
//==========================================================================
|
|
316
|
+
@interface MaxiCodeConfig : SpecificConfig
|
|
317
|
+
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
318
|
+
@end
|
|
319
|
+
|
|
311
320
|
//==========================================================================
|
|
312
321
|
// Datamatrix Config
|
|
313
322
|
//==========================================================================
|
|
@@ -441,6 +450,13 @@ typedef enum {
|
|
|
441
450
|
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
442
451
|
@end
|
|
443
452
|
|
|
453
|
+
//==========================================================================
|
|
454
|
+
// OCR Text Config
|
|
455
|
+
//==========================================================================
|
|
456
|
+
@interface OCRTextConfig : SpecificConfig
|
|
457
|
+
- (id)initWithDecoderType:(DecoderType)decoderType;
|
|
458
|
+
@end
|
|
459
|
+
|
|
444
460
|
//==========================================================================
|
|
445
461
|
// Config
|
|
446
462
|
//==========================================================================
|
|
@@ -475,11 +491,14 @@ typedef enum {
|
|
|
475
491
|
//==========================================================================
|
|
476
492
|
// Config
|
|
477
493
|
//==========================================================================
|
|
478
|
-
|
|
494
|
+
//@interface Config : NSObject
|
|
495
|
+
@interface Config : NSObject <NSCopying>
|
|
479
496
|
+(ConfigResponse*)configWithLicenseKey:(NSString*)key licenseCheckHandler:(void (^_Nullable)(LicenseCheckResult * _Nonnull result))callback;
|
|
480
497
|
|
|
481
498
|
+(int) setGlobalOption: (GlobalOption) option value: (int) value;
|
|
482
499
|
+(int) getGlobalOption: (GlobalOption) option;
|
|
500
|
+
+(void)setcustomOptionGlobal: (NSString *_Nonnull)option value:(int) value;
|
|
501
|
+
+(NSDictionary<NSString*, NSString*>* _Nonnull)getLicenseInfo;
|
|
483
502
|
|
|
484
503
|
@property (nonatomic, readonly, retain) AztecConfig* _Nonnull aztec;
|
|
485
504
|
@property (nonatomic, readonly, retain) AztecCompactConfig* _Nonnull aztecCompact;
|
|
@@ -519,8 +538,10 @@ typedef enum {
|
|
|
519
538
|
@property (nonatomic, readonly, retain) RoyalMailConfig* _Nonnull royalMail;
|
|
520
539
|
@property (nonatomic, readonly, retain) JapanesePostConfig* _Nonnull japanesePost;
|
|
521
540
|
@property (nonatomic, readonly, retain) KIXConfig* _Nonnull kix;
|
|
541
|
+
@property (nonatomic, readonly, retain) MaxiCodeConfig* _Nonnull maxiCode;
|
|
522
542
|
|
|
523
543
|
@property (nonatomic, readonly, retain) IDDocumentConfig* _Nonnull idDocument;
|
|
544
|
+
@property (nonatomic, readonly, retain) OCRTextConfig* _Nonnull ocrText;
|
|
524
545
|
|
|
525
546
|
@property (nonatomic, readwrite) DecodingSpeed decodingSpeed;
|
|
526
547
|
@property (nonatomic, readwrite) NSString * _Nonnull encodingCharacterSet;
|
|
@@ -592,7 +613,8 @@ typedef enum {
|
|
|
592
613
|
BT_AustralianPost,
|
|
593
614
|
BT_RoyalMail,
|
|
594
615
|
BT_KIX,
|
|
595
|
-
BT_JapanesePost
|
|
616
|
+
BT_JapanesePost,
|
|
617
|
+
BT_MaxiCode
|
|
596
618
|
|
|
597
619
|
} BarcodeType;
|
|
598
620
|
|
|
@@ -682,7 +704,17 @@ UIImage
|
|
|
682
704
|
+ (UIImage *)UIImageFromLocation:(UIImage *)source points:(CGPoint[4])points marginPercent:(float)marginPercent;
|
|
683
705
|
#endif
|
|
684
706
|
|
|
685
|
-
|
|
707
|
+
#if TARGET_OS_OSX
|
|
708
|
+
+ (NSImage *)WarpUIImageFromLocation:(NSImage *)source
|
|
709
|
+
#else
|
|
710
|
+
+ (UIImage *)WarpUIImageFromLocation:(UIImage *)source
|
|
711
|
+
#endif
|
|
712
|
+
points:(CGPoint[4])points // TL, TR, BR, BL (top-left origin)
|
|
713
|
+
size:(CGSize)size // if any dim is 0 → auto-size
|
|
714
|
+
aspectRatio:(CGFloat)aspectRatio // if >0 used for auto/derived dimension(s)
|
|
715
|
+
rotationShift:(NSInteger)rotationShift
|
|
716
|
+
margin:(CGFloat)margin
|
|
717
|
+
forceLandscape:(BOOL)forceLandscape;
|
|
686
718
|
|
|
687
719
|
|
|
688
720
|
@end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"shortDescription" : "barKoder model for oriented object detection.",
|
|
4
|
+
"metadataOutputVersion" : "3.0",
|
|
5
|
+
"outputSchema" : [
|
|
6
|
+
{
|
|
7
|
+
"hasShapeFlexibility" : "0",
|
|
8
|
+
"isOptional" : "0",
|
|
9
|
+
"dataType" : "Float32",
|
|
10
|
+
"formattedType" : "MultiArray (Float32)",
|
|
11
|
+
"shortDescription" : "",
|
|
12
|
+
"shape" : "[]",
|
|
13
|
+
"name" : "var_1253",
|
|
14
|
+
"type" : "MultiArray"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"version" : "2.0",
|
|
18
|
+
"modelParameters" : [
|
|
19
|
+
|
|
20
|
+
],
|
|
21
|
+
"author" : "barKoder Exporter",
|
|
22
|
+
"specificationVersion" : 4,
|
|
23
|
+
"storagePrecision" : "Int8",
|
|
24
|
+
"computePrecision" : "Float16",
|
|
25
|
+
"stateSchema" : [
|
|
26
|
+
|
|
27
|
+
],
|
|
28
|
+
"isUpdatable" : "0",
|
|
29
|
+
"availability" : {
|
|
30
|
+
"macOS" : "10.15",
|
|
31
|
+
"tvOS" : "13.0",
|
|
32
|
+
"visionOS" : "1.0",
|
|
33
|
+
"watchOS" : "6.0",
|
|
34
|
+
"iOS" : "13.0",
|
|
35
|
+
"macCatalyst" : "13.0"
|
|
36
|
+
},
|
|
37
|
+
"modelType" : {
|
|
38
|
+
"name" : "MLModelType_neuralNetwork"
|
|
39
|
+
},
|
|
40
|
+
"inputSchema" : [
|
|
41
|
+
{
|
|
42
|
+
"height" : "256",
|
|
43
|
+
"colorspace" : "RGB",
|
|
44
|
+
"isOptional" : "0",
|
|
45
|
+
"width" : "384",
|
|
46
|
+
"isColor" : "1",
|
|
47
|
+
"formattedType" : "Image (Color 384 × 256)",
|
|
48
|
+
"hasSizeFlexibility" : "0",
|
|
49
|
+
"type" : "Image",
|
|
50
|
+
"shortDescription" : "",
|
|
51
|
+
"name" : "image"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"userDefinedMetadata" : {
|
|
55
|
+
"com.github.apple.coremltools.source_dialect" : "TorchScript",
|
|
56
|
+
"names" : "{0: 'id_mrz_image', 1: 'mrz_2', 2: 'mrz_3', 3: 'id_mrz', 4: 'id_image', 5: 'face', 6: 'vin', 7: 'signature'}",
|
|
57
|
+
"imgsz" : "[256, 384]",
|
|
58
|
+
"com.github.apple.coremltools.source" : "torch==1.13.1+cu117",
|
|
59
|
+
"com.github.apple.coremltools.version" : "8.3.0"
|
|
60
|
+
},
|
|
61
|
+
"generatedClassName" : "n2_384x256_int8",
|
|
62
|
+
"neuralNetworkLayerTypeHistogram" : {
|
|
63
|
+
"Concat" : 16,
|
|
64
|
+
"Transpose" : 1,
|
|
65
|
+
"Multiply" : 60,
|
|
66
|
+
"ReshapeStatic" : 3,
|
|
67
|
+
"Add" : 7,
|
|
68
|
+
"PoolingINVALID" : 3,
|
|
69
|
+
"SplitND" : 8,
|
|
70
|
+
"UpsampleINVALID" : 2,
|
|
71
|
+
"Convolution" : 72,
|
|
72
|
+
"ActivationSigmoid" : 66,
|
|
73
|
+
"ConcatND" : 1
|
|
74
|
+
},
|
|
75
|
+
"method" : "predict"
|
|
76
|
+
}
|
|
77
|
+
]
|