troubleshooting Question

Coldfusion - ImagescaleToFit function

Avatar of Bang-O-Matic
Bang-O-Matic asked on
ColdFusion Language
13 Comments1 Solution773 ViewsLast Modified:
I'm trying to use the ImagescaleToFit function on all the photos in a folder. I'm getting an error "Unable to cast an object of type java.lang.String to Image." when I run the code below. Can someone look at the code and tell me where I went wrong? Thanks in advance!

<!---IMAGE SCALE TO FIT--->
                  
<cfdirectory directory="#ExpandPath('/ftp/resize/')#" name="picFiles">

<cfloop query="picFiles">

<cfimage name="#picfiles.Name#" source="#ExpandPath('/ftp/resize/')##picfiles.Name#">

<cfset ImageScaleToFit(#picfiles.Name#,600,425)>

</cfloop>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros