Using algorithms designed to sniff out suspicious shadows, computer scientists from Dartmouth and the University of California, Berkeley, say they have developed software that can reliably detect fake or altered photos.

The technique could be useful in the emerging field of photo forensics, said Hany Farid, a Dartmouth computer science professor and developer of the software. In the age of Photoshop, detecting manipulated photos is a growing priority for lawyers, journalists and people involved in law enforcement and national security.

To determine an image’s authenticity, the software uses geometric formulas to analyze shadows to determine if they are all physically consistent with a light source. Inconsistencies with the light or within the shadows themselves — some of which may be invisible to the naked eye — indicate the photo is doctored.

Analyzing shadows is a common technique in photo forensics, said the study, being published in the September issue of ACM Transactions on Graphics. But the eye simply cannot compete with the sophistication of today’s image-manipulation software.