Is there a program that will superimpose a grid onto a photo?
Creating grids for images can be done using almost all image editors which have drawing features. Some applications may allow you to place grids over a photo by using built-in tools. Alternatively, you can use advanced tools like Gimp, Adobe Photoshop, paint.NET to manually draw grid lines using the built-in rulers.
If you need the ISO/IEC 19794-5 grid (ID card, passport), try IDPhotoStudio : http://www.kcsoftwares.com/?idps