TimThumb is a PHP script by Darren Hoyt that can automatically create thumbnails on the fly, caching them for later use. It scales images to the width and height you specify, either keeping the original aspect ratio or cropping the image.
To make use of the script, once installed, you simply put the URL of the TimThumb script in an image tag, and pass arguments for the original image and the scaling options.
<img src="/thumbnails/timthumb.php?src= /images/an_image.jpg&w=128&h=128&zc=1" alt="">
This would be perfect for generating thumbnails for blog posts, which is, interestingly enough, what the script was originally developed for.