Path venant d'une URI

  • Auteur de la discussion poisson928
  • Date de début
P

poisson928

Membre
Inscrit
6 Mars 2015
Messages
1
Points
0
  • #1
Bonjour,j'essaye de récupérer un path d'une uri afin de l'avoir dans une Bitmap.
Voici mon code:
Code :

Uri taken = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI,
values);
stream = (FileOutputStream) getContentResolver().openOutputStream(
taken);
Intent intentPicture = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intentPicture.putExtra(MediaStore.EXTRA_OUTPUT, taken);
String path = getRealPathFromURI(taken);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
Bitmap monImage = BitmapFactory.decodeFile(path, options);
camera.takePicture(null, pictureCallback, pictureCallback);
Mais l'image ne se charge pas.
Merci d'avance.
 
T

Tardis

  • #2
Bonjour

Depuis le temps, tu as trouvé ton bonheur?
 

Sujets en relation

Haut Bas