Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun storeBitmapInFile(bitmap: Bitmap, file: File) {
- try {
- val fOut = FileOutputStream(file)
- bitmap.compress(Bitmap.CompressFormat.JPEG, 95, fOut)
- fOut.flush()
- fOut.close()
- } catch (e: Exception) {
- e.printStackTrace()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement