首页 > 代码库 > 根据Uri获取sd卡图片

根据Uri获取sd卡图片

<pre name="code" class="java">String mBigImage = URLEncoder.encode(mImageUrl.replace("*", ""), "UTF-8");
			String mBigImagePath = LoveHealthConstant.FILE_PATH + "images/" + mBigImage;
			File getImage = new File(mBigImagePath);


 // 读取uri所在的图片
				try {
					Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Uri.fromFile(getImage));
					mFullImageView.setImageBitmap(bitmap);
					Log.v("12345678901234567890123456",  bitmap.getHeight() + "/" + bitmap.getWidth());
				} catch (FileNotFoundException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

根据Uri获取sd卡图片