I know this question is a bit 'product specific' but I'm wondering about what 'might' be a CFC centric question.
 
I'll preface this with the main question up front: "So in short I'm wondering if this is maybe more an issue of understanding variables, scopes and CFC's? Or if the CFC needs to be extended to get the image file and return it as an object it can use as illustrated below in the multiple process example."
 
Essentially there is a CFC out there called "image.cfc v2.00b3, written by Rick Root ([EMAIL PROTECTED])" (I emailed him... no reply)
URL: http://www.opensourcecf.com/imagecfc/
 
This CFC allows you to manipulate images, it can be run 'process by process' (Seperate processes example below) by passing in an image location and output destination, or can use a reference (Multiple Processes example below) to the image object returned by the CFC. So I'm kind of at a chicken and the egg issue.
 
I'm trying to allow the user to choose one of many image processing options, but am unsure what and how many they may choose. I could write a lot of code for each action to determine if that action was selected and then yet more code to reuse the image object passed back by the cfc to use on the next selected option. This seems very dumb.
 
I'd rather use the CFC to load the image into it's variable scope ("result.img") and then to process by what was selected I can just throw the object against the function call.
 
Examples of his code is at:
http://www.opensourcecf.com/imagecfc/example.cfm
---------------------------------------------------------------
OR I'll include them;
Seperate processes:
<cfset imagecfc = createObject("component","image")>
<cfset results2 = imageCFC.scaleX("", "#ExpandPath(".")#/original.jpg", "#ExpandPath(".")#/resized.jpg", 400)>

<cfset results1 = imageCFC.rotate("", "#ExpandPath(".")#/resized.jpg", "#ExpandPath(".")#/rotated.jpg", -90 )>
 
Multiple Processes:
<cfset results12 = imageCFC.scaleX("", "#ExpandPath(".")#/feather.png", "", 100)>
 
!!!! - here is where it re-uses the object created, but you have to run a process first to get it into the 'results12.img' variable

<cfset results13 = imageCFC.flipVertical(results12.img, "", "")>
<cfset results14 = imageCFC.flipHorizontal(results13.img, "", "")>
--------------------------------------------------------------------------
 
Do I just read the image and load it into a var called results.img and call it good? This seems too simple.

Is this clear as mud?
 
 
Thanks for everyone's time and effort....

Brent Nicholas - [EMAIL PROTECTED]
 
"I can't afford to make exceptions. Once word leaks out that a pirate has gone soft, people begin to disobey you, and then it's nothing but work, work, work, all the time."
 
-- Man in Black - Princess Bride



You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at www.mail-archive.com/cfcdev@cfczone.org

Reply via email to