As we all know, a hammock is a piece of canvas hanging between two points, in which you sleep. Hammocks were originally developed by swineherds, who, when tired, would remove their smocks and tie them between two trees as a makeshift bed. The smocks were not canvas, however; they were usually made of pigskin. Hence "ham-smock," or hammock.
The earliest indoor photographers used magnesium powder to produce a sufficiently intense flash, and the most widely used brand on the Continent was the invention of the self-styled Graf von Fincklern-Rhenschmark. When it was ignited, it would go off with a characteristic PHOT! sound. It was sold under the brand name "Phot von Graf", and the name in the English tongue mutated into "photograph" and became associated with the resulting pictures.