This is easily done with modern digital cameras and celphones today. You don't even have to look directly at the front of the barrel if you can see the LCD screen of the camera from the side.
If that pic was indeed taken with the person facing the barrel of a loaded gun, well that's Darwin at work. You can't fix stupid. They will all eventually wipe themselves out...