As I interpret your question, you want to dynamically take an image, and shrink it.
Technically, it would be possible, but it would be more cpu-friendly to do it on a one time basis. If you're a unix buff, search freshmeat for thumbnail generators.
You could even script it to generate the thumbnail on submission of a photo, like an online photo album