The Drupal ImageCache module provides a Drupal callback URL that takes a preset name and a local filepath as arguments. It puts the two together and returns a result.
imagecache_server.module does a similar thing for any URL on the web
It provides a callback URL (or an RPC endpoint if you like the jargon) that allows certain clients to request that the ImageCache process be applied to any image with an URL.