显示的图片可超过1M
且不会出现OOM
ImageView jpgView = (ImageView)findViewById(R.id.jpgview); String myJpgPath = "/sdcard/DSC_0001.JPG"; BitmapFactory.Options options = new BitmapFactory.Options(); options.inSampleSize = 2; Bitmap bm = BitmapFactory.decodeFile(myJpgPath, options); jpgView.setImageBitmap(bm);
本文出自 “爬过山见过海” 博客,请务必保留此出处http://670176656.blog.51cto.com/4500575/1750901
原文地址:http://670176656.blog.51cto.com/4500575/1750901