From 9bab2cc562a90f92289ea1c85cc45f16439ea115 Mon Sep 17 00:00:00 2001 From: D N <4661784+retyui@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:33:03 +0200 Subject: [PATCH] fix: Resolve an issue with the Android build for React Native 0.75.x. --- .../imageeditor/ImageEditorModuleImpl.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModuleImpl.kt b/android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModuleImpl.kt index 8fd6014..ebc4c8f 100644 --- a/android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModuleImpl.kt +++ b/android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModuleImpl.kt @@ -196,7 +196,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) { y: Int, width: Int, height: Int, - headers: HashMap? + headers: HashMap? ): Bitmap? { return openBitmapInputStream(uri, headers)?.use { // Efficiently crops image without loading full resolution into memory @@ -258,7 +258,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) { rectHeight: Int, outputWidth: Int, outputHeight: Int, - headers: HashMap? + headers: HashMap? ): Bitmap? { Assertions.assertNotNull(outOptions) @@ -337,7 +337,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) { } } - private fun openBitmapInputStream(uri: String, headers: HashMap?): InputStream? { + private fun openBitmapInputStream(uri: String, headers: HashMap?): InputStream? { return if (uri.startsWith("data:")) { val src = uri.substring(uri.indexOf(",") + 1) ByteArrayInputStream(Base64.decode(src, Base64.DEFAULT))