Log on to E Passport Photo website
Select the country and type of photo you require and click "get my passport photo"
Now scroll down the page until you see the "free do it yourself service".
After uploading your photo you can re size to fit the regulations, then save and/or print.
Even if you don't have a printer you should be able to save it back to your memory card then take to one of those machines that print out a 6x4 photos. In Australia we paid 49c at K Mart for instant prints and each photo had 7 pictures on working out at just 7c per passport photo - bargain. In fact if you go for the 1-hour photo is is only 19c and the 24 hour processing 15c.
This could be a boon to backpackers - if you save a photo on your memory card, computer or even E-mail one to yourself you are in a position to quickly whip up a new photo for those unexpected border requirements etc.
Or before you set out on a trip why not be prepared and print off any sizes that may be of use, they weigh so little and take up almost no space that this could be a big time and money saving thing in the long term.