This is an Applescript I wrote a couple of years ago to resize and frame Jpeg images exported from Photoshop (for example) for Flickr.
The script relies on the ‘convert’ utility from the ImageMagick (imagemagick.org) library. It puts a [black] frame around the outside of the image, after resizing the image to a maximum of 1600px on the longest side. The frame displays an arbitrary string at the top left corner (e.g. for copyright).
The script will embed an sRGB ICC-profile in the resized Jpeg. I use ProPhoto for my Photoshop working space. But this is a much wider gamut than most monitors will display. Most web browsers will distort colors using that, much-wider, color gamut. So it is better to specify a recent version of the sRGB profile for the image. You can find sRGB color profiles here at the ICC website.
Finally, the script sharpens the resized image just a little and saves it as a renamed image in the same directory as the original.
I hope you find it useful. The script includes instructions, including on the best way to install ImageMagick.