Skip to content

Commit

Permalink
Merge pull request #162 from callstack/rn-75
Browse files Browse the repository at this point in the history
fix: Resolve an issue with the Android build for React Native 0.75.x.
  • Loading branch information
retyui authored Aug 20, 2024
2 parents 590fbb7 + 9bab2cc commit b4150a1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) {
y: Int,
width: Int,
height: Int,
headers: HashMap<String, Any?>?
headers: HashMap<String, Any>?
): Bitmap? {
return openBitmapInputStream(uri, headers)?.use {
// Efficiently crops image without loading full resolution into memory
Expand Down Expand Up @@ -258,7 +258,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) {
rectHeight: Int,
outputWidth: Int,
outputHeight: Int,
headers: HashMap<String, Any?>?
headers: HashMap<String, Any>?
): Bitmap? {
Assertions.assertNotNull(outOptions)

Expand Down Expand Up @@ -337,7 +337,7 @@ class ImageEditorModuleImpl(private val reactContext: ReactApplicationContext) {
}
}

private fun openBitmapInputStream(uri: String, headers: HashMap<String, Any?>?): InputStream? {
private fun openBitmapInputStream(uri: String, headers: HashMap<String, Any>?): InputStream? {
return if (uri.startsWith("data:")) {
val src = uri.substring(uri.indexOf(",") + 1)
ByteArrayInputStream(Base64.decode(src, Base64.DEFAULT))
Expand Down

0 comments on commit b4150a1

Please sign in to comment.