I try to decode a bitmap(1920x1920) from res/raw folder,which is an png resource.I need the full-scale bitmap. I want to use the BimtapFactory.decodeFileDescriptor rather than BitmapFactory.decodeFile||decodeResource because the higher reliability than others to handle OOM: While I try this code,The bitmap is NULL!!! But the file is not null. I've been playing hard. Help Please!
Context mCtx=MainActivity.this;
Bitmap bm = null;
//id is the resId in res/raw
AssetFileDescriptor file =mCtx.getResources().openRawResourceFd(R.raw.skin_default_0);
bm = BitmapFactory.decodeFileDescriptor(file.getFileDescriptor(), null,
options);