CAFE

Android

kotlin //Bitmap을 이용해 이미지를 회전 시킨다.

작성자운영자|작성시간19.06.18|조회수717 목록 댓글 0
// 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
}


다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼