One of the advantages of digital photography is you can shoot and print your own passport photos. However it’s not always clear what the rules are. Fortunately the State Department has a useful site on this:
In particular you need to know how to place the “face” in the image, which is outlined here:
This is also useful because the same format is used for things like International Licenses.