diff --git a/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorChannelHandler.kt b/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorChannelHandler.kt index 38f02a4a..9eb45338 100644 --- a/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorChannelHandler.kt +++ b/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorChannelHandler.kt @@ -77,7 +77,7 @@ class ImageProcessorChannelHandler(context: Context) : maxWidth: Int, maxHeight: Int, radius: Int, result: MethodChannel.Result ) = method( fileUrl, headers, filename, maxWidth, maxHeight, - ImageProcessorService.METHOD_DEEL_LAP_PORTRAIT, result, onIntent = { + ImageProcessorService.METHOD_DEEP_LAP_PORTRAIT, result, onIntent = { it.putExtra(ImageProcessorService.EXTRA_RADIUS, radius) } ) diff --git a/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorService.kt b/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorService.kt index e3411856..a1c88aff 100644 --- a/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorService.kt +++ b/plugin/android/src/main/kotlin/com/nkming/nc_photos/plugin/ImageProcessorService.kt @@ -27,7 +27,7 @@ class ImageProcessorService : Service() { companion object { const val EXTRA_METHOD = "method" const val METHOD_ZERO_DCE = "zero-dce" - const val METHOD_DEEL_LAP_PORTRAIT = "DeepLab3Portrait" + const val METHOD_DEEP_LAP_PORTRAIT = "DeepLab3Portrait" const val EXTRA_FILE_URL = "fileUrl" const val EXTRA_HEADERS = "headers" const val EXTRA_FILENAME = "filename" @@ -96,7 +96,7 @@ class ImageProcessorService : Service() { val method = intent.getStringExtra(EXTRA_METHOD) when (method) { METHOD_ZERO_DCE -> onZeroDce(startId, intent.extras!!) - METHOD_DEEL_LAP_PORTRAIT -> onDeepLapPortrait( + METHOD_DEEP_LAP_PORTRAIT -> onDeepLapPortrait( startId, intent.extras!! ) else -> { @@ -120,7 +120,7 @@ class ImageProcessorService : Service() { private fun onDeepLapPortrait(startId: Int, extras: Bundle) { return onMethod( - startId, extras, METHOD_DEEL_LAP_PORTRAIT, args = mapOf( + startId, extras, METHOD_DEEP_LAP_PORTRAIT, args = mapOf( "radius" to extras.getIntOrNull(EXTRA_RADIUS) ) ) @@ -444,7 +444,7 @@ private open class ImageProcessorCommandTask(context: Context) : fileUri ) - ImageProcessorService.METHOD_DEEL_LAP_PORTRAIT -> DeepLab3Portrait( + ImageProcessorService.METHOD_DEEP_LAP_PORTRAIT -> DeepLab3Portrait( context, cmd.maxWidth, cmd.maxHeight, cmd.args["radius"] as? Int ?: 16 ).infer(fileUri)