Your best bet is to use some sort of scripting language to do what you're talking about. The form can be written in in HTML, just direct the action to the script. I have a gallery setup here:
http://myspace.avclan.net/gallery
Images are submitted via form, then a php script resizes them if necessary, followed by the generation of a 100x100 center-cropped thumbnail image. If you like, I'll send you the script.