I think amazon.com does something like this. I read an article that dissected their product image urls to explain how their image service worked but I can't find it now. If I remember correctly the service could resize/rotate, add sale "stickers," and a bunch of other stuff.
EDIT found the article: http://aaugh.com/imageabuse.html