Skip to content

Commit

Permalink
Fix wrong orientation on Android 10
Browse files Browse the repository at this point in the history
Fixes bug aloisdeniel#10
  • Loading branch information
rignaneseleo authored Jul 28, 2020
1 parent dfb91ba commit f277e8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ class MediaGalleryPlugin: FlutterPlugin, MethodCallHandler {

private fun rotatedBitmap(bitmap: Bitmap, orientation: Long) : ByteArray {
val matrix = Matrix()
matrix.postRotate(orientation.toFloat())
//matrix.postRotate(orientation.toFloat())
val resultBitmap = Bitmap.createBitmap(bitmap!!, 0, 0, bitmap!!.getWidth(), bitmap!!.getHeight(), matrix, true)
val stream = ByteArrayOutputStream()
resultBitmap!!.compress(Bitmap.CompressFormat.JPEG, 100, stream)
Expand All @@ -537,4 +537,4 @@ class doAsync<T>(val handler: () -> T, val post: (result:T) -> Unit) : AsyncTask
post(result)
return
}
}
}

0 comments on commit f277e8c

Please sign in to comment.