Can you use image without saving it to file on Android? -


i'm trying implement camera app features. need take picture using phone's camera , manipulate image. however, don't need save picture file, need "data" picture. there way take picture , load bitmap or need @ least save it, read , delete it.

i read tutorial: https://developer.android.com/training/camera/photobasics.html, saving , deleting images seems heavy on processor, i'd avoid if can. ty

start intent

intent cameraintent = new intent(android.provider.mediastore.action_image_capture);  startactivityforresult(cameraintent, camera_request); 

activity result

protected void onactivityresult(int requestcode, int resultcode, intent data) {       if (requestcode == camera_request && resultcode == result_ok) {           bitmap photo = (bitmap) data.getextras().get("data");      }   }  

note: thumbnail image "data" might icon, not lot more. dealing full-sized image takes bit more work.


Comments