I hate to see posts slowly sinking to the bottom of the page with no replies, so I'll take a stab.
Does the server you're hosted on have ImageMagick? It's a pretty popular package on shared hosting accounts (for PHP at least - not sure about CF). If not, it's a free download.
I think you can run ImageMagick from within CF, assuming the commands you need to run it are not restricted.
You could also try ImageCFC
Thanks for writing back. I have no idea if our Cold Fusion server has ImageMagick on it or not. How do I install it on the server exactly?
I just tried running this code for imageCFC on a cfm page:
<cfset imageCFC = createObject("component","image")>
<cfset imgInfo = imageCFC.scaleWidth("", "BlogPhotos/C11IP139.jpg", "BlogPhotos/tn_C11IP139.jpg",100)>
<img src="C11IP139.jpg" width="100" alt="resized image"/>
But the error I receive back says:
Could not find the ColdFusion Component image
What does this mean exactly? Does imageCFC have to be downloaded to the server in order to use the code above?
Well I've never used ImageCFC so I'm not really sure how it works, but that sounds like a pathing problem (i.e. your code doesn't know whetre to find image.cfc).
ImageCFC has its own forum for debugging and usage help:
Imagemagick would probably have to be installed by the server admin.
So Imagemagick does not just get put as a folder under the root of our web site? It has to actually be installed on the server, correct? Can you send me an example of some code of how to re-size an image with Imagemagick?
I ended up using the ImageCFC code and was able to get it to work. I incorporated it into my upload file also so when an image is uploaded, it gets re-sized right away to the dimensions I want it to be. Here's the code that uploads the image into the correct folder and then also re-sizes it right away:
<cffile action="upload" filefield="Image1" destination="#ExpandPath("BlogPhotos/")#" nameconflict="overwrite">
<cfset uploadedfile = "test_file\#file.serverfile#">
<input name="Blog_Image" type="hidden" value="#file.ServerFile#">
<!--- Imagecfc code re-sizes the image and saves it into the BlogPhotos folder at 200 pixels wide. --->
<cfset imagecfc = createObject("component","imagecfc.image")>
<cfset imgInfo = imageCFC.scaleWidth(
Nice job! Glad you got it working.