My multifunction image handler can do that on a gif, png, or jpg
http://www.carmosaic.com/weather/scripts-image-handler.php * Supports .jpg .gif and .png, download an image, cache the image, display the image
* Supports remote images or local images on your web server
* Convert the image type(optional)
* Crop the image(optional)
* Resize the image(optional)
* Resize the image preserving aspect ratio(optional)
* Jpeg compression(optional)
* Annotate text on the image, add up to 3 text overlays(optional)
* Multi line text support(optional)
* Text alignment options(optional)
* Text margin options(optional)
* Text color options(optional)
* Auto archive/rotate images with or without thumbs, this feature can be utilized for web cam image archiving(optional)
* Outputs most errors as an image with error code.