// Bitmap을 이용해 이미지를 회전 시킨다.
fun imgRotate(bmp: Bitmap, orientation: Float): Bitmap {
val width = bmp.width
val height = bmp.height
val matrix = Matrix()
matrix.postRotate(orientation)
val resizedBitmap = Bitmap.createBitmap(bmp, 0, 0, width, height, matrix, true)
bmp.recycle()
return resizedBitmap
}
다음검색