i was try to merge your sample to my project, all code on my project that i used for take image from camera/gallery is the same code with your sample code here.
but when i try exec on my device (on my project) i always get empty image after take image from camera, but when i use gallery to pick my images it updated.