This is a black and white animated gif from the 1926 Classic Comedy film, The General, of Johnny Gray (Buster Keaton) sitting next to the train's boiler and contemplating his next move.

from the 1926 classic film
The General