You can use ImageCopyResized() if you have the gd library and if your server isn't running in safe-mode. I just went through the same thing, but hostrocket only runs in safe mode. (I'm not dogginhostrocket) It turns out that ImageMagick was installed on my server, so I decided to use it and scratch the whole blob idea. Even though it was pretty cool seeing those image files in the database. From what I read those image files are really hard on your database. Anyway, I'm so impressed with it ImageMagick. It walks all over image quality compared to the gd. (not doggin gd though) It's just that when I ImageCopyResized() with gd the quality of my thumbnails weren't so great since gd only uses 256 colors. ImageMagick made my images mirrored versions on the fly with the script I'm using to upload the original image.
If you have ImageMagick installed on your server you can use the exec() function to run it a string. Something like:
$upfile ="/home/blah/www/pics/image.jpg";
$to_file ="/home/blah/www/pics/image-tn.jpg";
exec("convert -geometry 200x200 $upfile $to_file");
It's the same as saying in PUTTY.exe
convert - geometry 200x200 /home/blah/www/pics/image.jpg /home/blah/www/pics/image-tn.jpg
This works if you already have an image.jpg in the pics directory.
If you want it to upload an image and create a thumbnail on the fly you'll have to use a form with <input type=file name=picture>. Check out http://www.phpbuilder.com/columns/florian19991014.php3
Of course you'll have to add the exec() command to take the file that was just uploaded with the form and then make a thumbnail with that picture if you want to do it on the fly.
I'm sorta happy that my situation turned out like this because I know my image will popup quicker. However, I'm still trying to figure out how to change the permissions of my picture directories back to 755 after them being set at 777 for uploading the images.