<How do I convert bitmap fto FIle in kotlin? I use...
# stackoverflow
u
How do I convert bitmap fto FIle in kotlin? I use Fragment This is my code : private val cameraResult = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> if (result.resultCode == Activity.RESULT_OK && result.data != null) { val bitmap = result.data?.extras?.get("data") as Bitmap binding.ivProfile.loadImage(bitmap) } } the result type is bitmap, but the required type that server needed is File. So how can i convert bitmap to File? Thankyou...