BitmapFactory.decodeResource 在加载大图片会出现OOM。
改成BitmapFactory.decodeStream
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inPreferredConfig = Bitmap.Config.ARGB_8888;
opt.inPurgeable = true;
opt.inInputShareable = true;
//获取资源图片
InputStream is = getResources().openRawResource(R.drawable.image);
return BitmapFactory.decodeStream(is, null, opt);