이미지 압축 & 회전 & 변환
·
📘 Backend/Kotlin
이미지 압축 & 회전 fun rotateCompressImage(orientation : Int, width : Double, height : Double, file : File) : File { val atf = AffineTransform() var width = width var height = height when (orientation) { 1 -> {} 2 -> { atf.scale(-1.0, 1.0) atf.translate(-width, 0.0) } 3 -> { atf.translate(width, height) atf.rotate(Math.PI) } 4 -> { atf.scale(1.0, -1.0) atf.translate(0.0, -height) } 5 -> { atf.rotate(-M..