how photography works