Results 1 to 2 of 2
-
01-09-2010, 03:11 PM #1
Resize and upload the Image Error (Could not find the ColdFusion Component)
It gives this error
Could not find the ColdFusion Component or Interface Image.
106 : <!--- create the object --->
107 : <cfset myImage = CreateObject("Component","Image") />
108 : <cfset myImage = CreateObject('Component', 'Image').setKey('68DPN-P2M2E-X8CRC-7DBVA-RXXB0') />
109 :Code:<cfset Image1 = createuuid()> <cfset Image1 = #Image1# & ".jpg"> <cffile action="upload" filefield="file" destination="#imageFolderPath#" nameconflict="MakeUnique" accept="image/*"> <cffile action="rename" source="#imageFolderPath#/#cffile.ServerFile#" destination="#imageFolderPath#/#Image1#"> <!--- create the object ---> <cfset myImage = CreateObject("Component","Image") /> <cfset myImage = CreateObject('Component', 'Image').setKey('68DPN-P2M2E-X8CRC-7DBVA-RXXB0') /> <!--- open the image to resize ---> <cfset myImage.readImage(imageFolderPath & Image1) /> <cfset width = myImage.getWidth() /> <cfif width gt 740> <!--- resize the image proportionally on the width ---> <cfset myImage.scaleWidth(740) /> </cfif> <cfset height = myImage.getHeight() /> <cfif height gt 520> <!--- resize the image proportionally on the height ---> <cfset myImage.scaleHeight(520) /> </cfif> <!--- output the image in JPG format ---> <cfset myImage.writeImage(imageFolderPathE & 'A' & Image1, "jpg") />
-
02-02-2010, 11:35 AM #2
Without knowing anything about your paths or mappings, the error suggests a missing mapping. If you have upgraded versions ie 6/7 to CF8, also check into reserved words. I'm not sure if "Image" is one ...It works fine on old web server, but stop working on new server.
Similar Threads
-
Client Side Image Upload and Crop Tool
By manik in forum Web Development - Programming & CodingReplies: 1Last Post: 03-10-2009, 01:42 AM




Reply With Quote

