Je sais lire un fichier bitmap dans un tableau d'octets. Comment le tableau d'octets est-il ensuite converti en un bitmap Java?Comment lire un fichier dans un bitmap Java?
9
A
Répondre
9
Utilisez BitmapFactory
si vous avez déjà votre tableau d'octets:
Bitmap bitmap = BitmapFactory.decodeByteArray(yourByteArray, offset, length);
45
Passer le tableau d'octets si vous voulez: Bitmap bitmap = BitmapFactory.decodeFile (nom de fichier);
définir Bitmap Java. –
également, définir le fichier bitmap –
Bitmap Java: http://developer.android.com/reference/android/graphics/Bitmap.html –