camera takes picture and shows preview