i have problem out of memory bitmap. code:
uri bitmappictureuri = intent.getparcelableextra(taskactivity.photo); bitmap bitmap = null; try { bitmap = mediastore.images.media.getbitmap(this.getcontentresolver(), bitmappictureuri); } catch (filenotfoundexception e) { // todo auto-generated catch block e.printstacktrace(); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } int nh = (int) (bitmap.getheight() * (512.0 / bitmap.getwidth())); bitmappicture = bitmap.createscaledbitmap(bitmap, 512, nh, true); picture.setimagebitmap(bitmappicture); filename.settext(tnametext+"_"+getcurrenttime()); everything ok when change orientation outofmemory. how can solve problem? thinking softreference don't know how can use bitmap. idea?
Comments
Post a Comment