Well, "photoshop macro" gets a number of hits for me...but they are more often referred to in photoshop as "actions". They are run in batch processing mode. I'd go into more detail, but
http://www.dreamincode.net/forums/showtopic19313.htmta-dah! We've got a simple tutorial on doing them right here at </DIC>

It can take a few runs to figure out some of the options (especially if you want to keep the originals and save the new ones in a different directory), but otherwise it works like a charm.
If you have any problems with getting them up and running, feel free to post either here or in the graphic design forum. Graphic design gets a little more traffic than this forum, and it's probably be more closely related to your topic anyway. But either will work.
And if you do decide to make an application to do this (because, hey, why not, right?), you'll probably have some luck over in the C/C++ forum (I assume that you'd be using C++ because of what you put in your first post).
Hope that helps, and that you get all those pics resized.