There sure is. You could for instance use the GD library to do this.
Personal note:
If I were to do this, I'd generate the thumbnails when the user uploads the image and store the thumbnail at the same time as I stored the rest of the data. This will save some load and time when the users are browsing the images. It will increase the database size, but thinking of the prices on harddrives now a days, it doesn't really matter 🙂
Good luck,
Olle