我想從手機的SD卡中選擇一張圖片。我使用下面的代碼來選擇和我的活動,以顯示將圖像轉換爲位圖android
Uri selectedImageUri = data.getData();
selectedImagePath = getPath(selectedImageUri);
Uri uri = Uri.parse(selectedImagePath);
uploadimage.setImageURI(uri);
它工作正常,但我想這個圖像轉換爲Bitmap
,我有圖像路徑和URI。
如何在這種情況下將圖像轉換爲位圖?請提前幫助,幫助我。
使用這個鏈接.. http://www.higherpass.com/Android/Tutorials/Working-With-Images-In-Android/2/ – Uttam
你可以閱讀關於使用位圖的地方http://maximbogatov.wordpress.com/2011/08/03/bitmaps-in-android/有一個例子,如何從路徑獲取Bitmp。 – Maxim