Here is my code:
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResource
Thanks to @CommonsWare and @petey,Loading Large Bitmaps Efficiently works for me.
This alerts you that in some devices you could have memory problems doing this. Try resizing the image to reduce his size. You also can set a larger memory heap witting android:largeHeap="true" in the manifest but i wouldn't recommend that.