Hi Rick, Your code should be as below as below and it should work. Inside ImageResize() function, you should pass the image Object created through ImageNew() function...that is, "thumb" and not "oldthumb". "oldthumb" is a filename/path which is not accepted by ImageResize function.
<cfset oldthumb = "#cffile.ClientFileName#.#cffile.ClientFileExt#"> <cfset thumb=ImageNew("E:\websites\ironwillsports\thumbs\#oldthumb#")> <cfset ImageResize("#thumb#","","75","mitchell",1)> <cfimage source="#oldthumb#" action="write" destination="E:\websites\ironwillsports\thumbs\#cffile.ClientFileName#.# cffi le.ClientFileExt#" overwrite="yes"> Thanks Jayesh Viradiya Adobe CF Team -----Original Message----- From: Rick Sanders [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2007 9:18 AM To: CF-Talk Subject: CF 8 Image resize help Hey list, I'm having a problem using the image resize with a variable with CF 8. The error I'm getting is: Unable to cast an object of type java.lang.String to Image. The error occurred in E:\Websites\ironwillsports\submitvideo3.cfm: line 19 17 : <cfset oldthumb = "#cffile.ClientFileName#.#cffile.ClientFileExt#"> 18 : <cfset thumb=ImageNew("E:\websites\ironwillsports\thumbs\#oldthumb#")> 19 : <cfset ImageResize("#oldthumb#","","75","mitchell",1)> 20 : <cfimage source="#oldthumb#" action="write" destination="E:\websites\ironwillsports\thumbs\#cffile.ClientFileName#.# cffi le.ClientFileExt#" overwrite="yes"> 21 : </cfif> My code is: <cfset oldthumb = "#cffile.ClientFileName#.#cffile.ClientFileExt#"> <cfset thumb=ImageNew("E:\websites\ironwillsports\thumbs\#oldthumb#")> <cfset ImageResize("#oldthumb#","","75","mitchell",1)> <cfimage source="#oldthumb#" action="write" destination="E:\websites\ironwillsports\thumbs\#cffile.ClientFileName#.# cffi le.ClientFileExt#" overwrite="yes"> Any help would be greatly appreciated. Thanks! Webenergy Rick Sanders President Canada: 902-401-7689 USA: 919-799-9076 Canada: www.webenergy.ca USA: www.webenergyusa.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288629 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4