Skip to content

Instantly share code, notes, and snippets.

@Syex
Created June 8, 2018 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Syex/347b17b7025f9210438061d1cb6b293d to your computer and use it in GitHub Desktop.
Save Syex/347b17b7025f9210438061d1cb6b293d to your computer and use it in GitHub Desktop.
val bitmap = MediaStore.Images.Media.getBitmap(contentResolver, imageUri)
val matrix = Matrix().apply { postRotate(90f) }
val rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.width, bitmap.height, matrix, true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment