Code for image capture app