I am a student pilot and i agree we must pay attention look out etc...
but..
we are aloud to fiddle with radios,nav systems altimeters do calculations on maps etc etc..
so why not take a picture with a camera? no less safe in my book than fiddling with any of the above.
depends on circumstances i suppose.