poisson928 Posté(e) 6 mars 2015 Share Posté(e) 6 mars 2015 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. Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
Recommended Posts
Rejoignez la conversation
Vous pouvez poster maintenant et vous enregistrez plus tard. Si vous avez un compte, connectez-vous maintenant pour poster.