diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/Ocr.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/Ocr.kt index 958fb894..5c9ac3b4 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/Ocr.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/Ocr.kt @@ -71,7 +71,7 @@ class Ocr(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntime) @JvmStatic @RhinoRuntimeFunctionInterface - fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { argList -> + fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { argList -> val (arg0, arg1, arg2) = argList when { @@ -149,7 +149,7 @@ class Ocr(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntime) @JvmStatic @RhinoRuntimeFunctionInterface - fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { argList -> + fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { argList -> val (arg0, arg1, arg2) = argList when { diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrMLKit.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrMLKit.kt index 7355f8c1..80a30fe3 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrMLKit.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrMLKit.kt @@ -26,13 +26,13 @@ class OcrMLKit(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRun @JvmStatic @RhinoRuntimeFunctionInterface - fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonRecognizeText(scriptRuntime, OcrMode.MLKIT, *it) } @JvmStatic @RhinoRuntimeFunctionInterface - fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonDetect(scriptRuntime, OcrMode.MLKIT, *it) } diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrPaddle.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrPaddle.kt index 8495c604..4692caa4 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrPaddle.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrPaddle.kt @@ -33,13 +33,13 @@ class OcrPaddle(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRu @JvmStatic @RhinoRuntimeFunctionInterface - fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonRecognizeText(scriptRuntime, OcrMode.PADDLE, *it) } @JvmStatic @RhinoRuntimeFunctionInterface - fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonDetect(scriptRuntime, OcrMode.PADDLE, *it) } diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrRapid.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrRapid.kt index 13aa258c..0878feeb 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrRapid.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/ocr/OcrRapid.kt @@ -26,13 +26,13 @@ class OcrRapid(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRun @JvmStatic @RhinoRuntimeFunctionInterface - fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun recognizeText(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonRecognizeText(scriptRuntime, OcrMode.RAPID, *it) } @JvmStatic @RhinoRuntimeFunctionInterface - fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 2) { + fun detect(scriptRuntime: ScriptRuntime, args: Array): NativeArray = ensureArgumentsAtMost(args, 3) { Ocr.commonDetect(scriptRuntime, OcrMode.RAPID, *it) } diff --git a/version.properties b/version.properties index 11ff345a..a864ba93 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ -#Mon Dec 02 14:58:14 CST 2024 -BUILD_TIME=1733122694239 +#Mon Dec 02 16:52:56 CST 2024 +BUILD_TIME=1733129576279 COMPILE_SDK_VERSION=34 JAVA_VERSION=23 JAVA_VERSION_MIN_RADICAL=0 @@ -17,6 +17,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 TARGET_SDK_VERSION=34 TARGET_SDK_VERSION_INRT=29 -VERSION_BUILD=2882 +VERSION_BUILD=2883 VERSION_NAME=6.6.0 VSCODE_EXT_REQUIRED_VERSION=1.0.8