I think the issue you are running into is that you must do at least
three steps, load, some manipulation, and write. If you call each one of
those methods using separate <cfinvoke> calls then it won't work because
you are using three different instances of the same CFC. Personally, I
would do it all in <cfscript> like as follows.
<cfscript>
imageUtils = CreateObject("component", "yourCFChere");
imageUtils.load("filepath");
imageUtils.thumbnail(250);
imageUtils.writeResult("resultpath");
</cfscript>
Matt Liotta
President & CEO
Montara Software, Inc.
http://www.montarasoftware.com/
V: 415-577-8070
F: 415-341-8906
P: [EMAIL PROTECTED]
> -----Original Message-----
> From: Chris Kief [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 6:13 PM
> To: CF-Talk
> Subject: RE: Image manipulation with CFMX and JAI
>
> One final question...do you have any code examples for invoking the
cfc?
> Since load, writeResult and thumbnail are distinct methods, it
appeared
> that you had to cfinvoke each one individually. This obviously didn't
> work.
>
> So I rewrote the component to this:
> <cffunction access="public" name="testMine">
> <cfargument name="initfilename" type="string" required="true">
> <cfargument name="edgeLength" type="numeric" required="true">
> <cfargument name="endfilename" type="string" required="true">
> <cfargument name="type" type="string" required="true">
> <!--- load the image --->
> <cfscript>
> iu.load(arguments.initfilename);
> loaded = true;
> </cfscript>
> <!--- resize the image --->
> <cfif loaded>
> <cfscript>
> iu.thumbnail(arguments.edgeLength);
> result = true;
> </cfscript>
> </cfif>
> <!--- write out the result --->
> <cfif result>
> <cfscript>
> if(result)
> iu.writeResult(arguments.endfilename, arguments.type);
> </cfscript>
> </cfif>
> </cffunction>
>
> And then invoked it like so:
> <cfinvoke
> component="CFM_Tests.ImageUtils"
> method="testMine">
> <cfinvokeargument name="initfilename"
> value="C:\Inetpub\wwwroot\CFM_Tests\images\mono.jpg"/>
> <cfinvokeargument name="edgeLength" value="250"/>
> <cfinvokeargument name="endfilename"
> value="C:\Inetpub\wwwroot\CFM_Tests\images\monoTH.jpg"/>
> <cfinvokeargument name="type" value="JPEG"/>
> </cfinvoke>
>
> This worked fine but there must be a better way to do this - similar
to
> the way you wrote the component??
>
> Chris
>
>
>
> -----Original Message-----
> From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 24, 2002 5:58 PM
> To: CF-Talk
> Subject: RE: Image manipulation with CFMX and JAI
>
> The URL I posted earlier still works (assuming it doesn't wrap) and
has
> the updated content. Apparently the article was only removed from the
> front page pending approval.
>
> Matt Liotta
> President & CEO
> Montara Software, Inc.
> http://www.montarasoftware.com/
> V: 415-577-8070
> F: 415-341-8906
> P: [EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Chris Kief [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 24, 2002 5:56 PM
> > To: CF-Talk
> > Subject: RE: Image manipulation with CFMX and JAI
> >
> > That's a definite pain. But thanks for updating the article, us
> novices
> > out there will definitely appreciate any extra guidance.
> >
> > Thanks again for the help!
> > Chris
> >
> >
> > -----Original Message-----
> > From: Matt Liotta [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 24, 2002 5:16 PM
> > To: CF-Talk
> > Subject: RE: Image manipulation with CFMX and JAI
> >
> > I just updated the article as suggested. Apparently, the article has
> to
> > be re-approved now, so it is no longer available on their site.
> > Hopefully, that will be real soon. If I would have known that
editing
> it
> > would take the article down I wouldn't have done it. Hindsight!
> >
> > Matt Liotta
> > President & CEO
> > Montara Software, Inc.
> > http://www.montarasoftware.com/
> > V: 415-577-8070
> > F: 415-341-8906
> > P: [EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: Paul Hastings [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 24, 2002 4:46 PM
> > > To: CF-Talk
> > > Subject: Re: Image manipulation with CFMX and JAI
> > >
> > > naw it was those missing var declarations....might want to include
> all
> > > this
> > > in your article(s) for us know-no-better java novices....thanks.
> > >
> > > > You need to have a JDK installed and then download the JAI
> > installer.
> > > > The two jars you need in your classpath are jai_codec.jar and
> > > > jai_core.jar.
> > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.375 / Virus Database: 210 - Release Date: 10/7/2545
> > >
> > >
> >
> >
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists