toOutputStream

fun Bitmap.toOutputStream(compressFormat: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 100): OutputStream