Hey all (Rick if you're available)...
I'm trying to upload, resize and watermark an image using Image.cfc from
Rick Root. The first two parts work just fine but when it tries to watermark
the image, I get the following error:
-------
The selected method drawImage was not found. Either there are no methods
with the specified method name and argument types, or the method drawImage
is overloaded with arguments types that ColdFusion can't decipher reliably.
If this is a Java object and you verified that the method exists, you may
need to use the javacast function to reduce ambiguity.
The error occurred on line 941.
-------
I've just downloaded the most recent version of the CFC from Rick's site.
Here's the relevant portions of code. Does anyone know what's going on? I'm
running on some flavor of Linux.
=============
<cfset serverpath = "/home/web/k/koni-na.com/www/images/pics/">
<!--- upload the file --->
<cffile action="UPLOAD" filefield="FORM.photo" destination="#serverpath#"
nameconflict="makeunique">
<cfset originalImg = serverpath & CFFILE.serverfile>
<cfset largewatermark =
"/home/web/k/koni-na.com/www/images/watermark_1280x69.jpg">
<cfset smallwatermark =
"/home/web/k/koni-na.com/www/images/watermark_225x22.jpg">
<!--- get the width of the current image --->
<cfset tmpDetails = APPLICATION.imgObj.getImageInfo("",serverpath &
CFFILE.serverfile)>
<cfset tmpWidth = tmpDetails.width>
<!--- if the image is larger than 1280, then we'll sample down--->
<cfif tmpWidth GT 1280>
<!--- create the large version --->
<cfset APPLICATION.imgObj.scaleX("", "#originalImg#",
"#serverpath#tmp_#CFFILE.serverfile#", 1280)>
<!--- get new image details --->
<cfset imgDim =
APPLICATION.imgObj.getImageInfo("","#serverpath#tmp_#CFFILE.serverfile#")>
<cfset imgHeight = imgDim.height>
<cfset pos = imgHeight-115>
<!--- watermark the large version --->
<cfset APPLICATION.imgObj.watermark("", "",
"#serverpath#tmp_#CFFILE.serverfile#", "#largewatermark#", 1, 0, pos,
"#serverpath#lg_#CFFILE.serverfile#",100)>
</cfif>
=============
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263307
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4