@cronapp/mlkit-api 1.0.2 → 1.0.4
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/cronapp.json +1 -1
- package/i18n/locale_en_us.json +3 -3
- package/i18n/locale_pt_br.json +3 -3
- package/mlkit-api.cronapi.js +5 -1
- package/package.json +1 -1
package/cronapp.json
CHANGED
package/i18n/locale_en_us.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"faceDetector": "Face Detector",
|
|
3
|
-
"faceDetectorDescription": "Detects faces in an image",
|
|
4
|
-
"image": "Image: File path or Base64 with pattern data:image/<
|
|
5
|
-
"options": "Options: Json with
|
|
3
|
+
"faceDetectorDescription": "Detects faces and features in an image",
|
|
4
|
+
"image": "Image: File path or Base64 with pattern data:image/<jpeg|png>;base64,<data>",
|
|
5
|
+
"options": "Options: Json with options. Possible keys: classificationMode: 1 for none or 2 all, performanceMode: 1 for fast or 2 accurate, contourMode: 1 for none 2 for all and landmarkMode: 1 for none and 2 for all"
|
|
6
6
|
}
|
package/i18n/locale_pt_br.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"faceDetector": "Detector de Rosto",
|
|
3
|
-
"faceDetectorDescription": "Detecta rostos em uma imagem",
|
|
4
|
-
"image": "Imagem: Caminho do arquivo ou Base64 com padrão data:image/<
|
|
5
|
-
"options": "Opções: Json com
|
|
3
|
+
"faceDetectorDescription": "Detecta rostos e suas propriedades em uma imagem",
|
|
4
|
+
"image": "Imagem: Caminho do arquivo ou Base64 com padrão data:image/<jpeg|png>;base64,<data>",
|
|
5
|
+
"options": "Opções: Json com opções. Possíveis chaves: classificationMode: 1 para nenhum ou 2 todos, performanceMode: 1 para rápida ou 2 acurada, contourMode: 1 para nenhum 2 para todos e landmarkMode: 1 para nenhum e 2 para todos"
|
|
6
6
|
}
|
package/mlkit-api.cronapi.js
CHANGED
|
@@ -21,9 +21,13 @@
|
|
|
21
21
|
|
|
22
22
|
return new Promise((resolve, reject) => {
|
|
23
23
|
try {
|
|
24
|
+
options = options || {};
|
|
25
|
+
if (typeof options === 'string') {
|
|
26
|
+
options = JSON.parse(options);
|
|
27
|
+
}
|
|
24
28
|
CronappMLKitPlugin.faceDetector(
|
|
25
29
|
image,
|
|
26
|
-
options
|
|
30
|
+
options,
|
|
27
31
|
(json) => {
|
|
28
32
|
resolve(json);
|
|
29
33
|
},
|