Comment convertir imageview à byteArray Kotlin androidComment convertir imageview à byteArray en Kotlin
En java
Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap();
ByteArrayOutputStream stream=new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 90, stream);
byte[] image=stream.toByteArray();
return image
Vous pouvez copier coller ce code dans votre fichier Kotlin dans Android Studio il va se convertir à Kotlin. – zsmb13