Relatively painless, I must say. Since we were going to need 4 pics of each of us (2 for the passports and 2 for the dossier), and we really didn't want to pay $7 or $8 apiece for just 2 photos, we decided to see if we could find something cheaper than paying about $30 for our pics.
I found http://www.epassportphoto.com/ which had a link to the State Department's passport photo requirements and tips for taking your own photos. We took our own photos according to their guidelines. I followed their instructions, uploaded my photos to the site, and used their positioning template to make my own passphotos. Then I saved them to my computer, and uploaded them to be printed at my local Wal-Mart's 1-hour photo. They were not ready when promised so we actually got them FREE! And, they passed the test today at the Post Office!