> 1) I keep seeing in the HOF list archives that developers are using an
> ACTION="iml", though I can't find documentation for that attribute
> anywhere in the CFX_Image docs (v1.6.6.9).  What does this Attribute do?

Theres a text file on nothing but IML in the zip here.
http://www.kolumbus.fi/jukka.manner/

> 2) If I need to do a two-step process, for example, resizing the image
> AND converting the file to another format, should I first resize, then
> park the output in a temp directory, then in the second step, grab the
> image from the temp directory then output to the final directory?

One would THINK that doing your changes would be better suited for the
original image type but i dont really know about that. CFX_Image has always
given me poor image quality  anyway....thats why I switched to efflare's
CFX_ImageCR. Efflare also has some other great tags for image manipulation.
I'd check them out if you are going to be dealing with images that users
upload alot.

> 3) After the conversion/resizing process, I want to grab the full file
> path, then write this info to a database. How do I get the final image
> name and CFSET as a variable, so I can do a db insert.

once you are done with the image, as far as manipulating t, you had to
CFFILE Action=Copy or Action=MOVE  to get it where it needed to be right??
just use the path destination info from your last CFFILE tag??? You had to
use the path to get it where it's at somewhere in the code.

<CFFILE  ACTION="move"
                 SOURCE="#Temp_Directory_Path#\My_New_Image.jpg"

DESTINATION="#Final_Image_Destination_Path#\My_New_Image.jpg"..........

<CFSET ImageLocation="#Final_Image_Destination_Path#\My_New_Image.jpg">

----- Original Message -----
From: "Mark Leder" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 6:44 AM
Subject: CFX_Image Help


> Hi All,
> I'm using this tag to grab an image file uploaded by an end user through
> a "file" form field.
>
> I want to convert it to jpg and resize it if necessary (borrowing from a
> CFDJ article.
>
> Three issues:
>
> 1) I keep seeing in the HOF list archives that developers are using an
> ACTION="iml", though I can't find documentation for that attribute
> anywhere in the CFX_Image docs (v1.6.6.9).  What does this Attribute do?
>
> 2) If I need to do a two-step process, for example, resizing the image
> AND converting the file to another format, should I first resize, then
> park the output in a temp directory, then in the second step, grab the
> image from the temp directory then output to the final directory?
>
> 3) After the conversion/resizing process, I want to grab the full file
> path, then write this info to a database. How do I get the final image
> name and CFSET as a variable, so I can do a db insert.
>
> I've attached my code below (note that I'm Cfincluding this, so that db
> inserts won't be listed here):
>
> Thanks,
> Mark
>
> ========================================
>
> <!--- Set the variables for use in this template
> /////////////////////////////////////////////////////////////////--->
> <!--- List of process type variables +++++++++
> Resizing:
> Resize Dimensions = resizedim in pixels
> File Type Conversion
> B1 = convert to jpg, B2 = convert to gif
> +++++++++++++++++++++++++++++++++ --->
>
> <!--- Resizing properties --->
> <cfset VARIABLES.resizedim = 300>
>
> <!--- File Conversion Properties --->
> <cfset VARIABLES.converttype = B1>
>
> <!--- Other Parameters --->
> <cfset VARIABLES.formFile = FORM.biopic>
>
> <!--- Temporary Processing Image Path Location --->
> <cfset REQUEST.tempPics =
> "#REQUEST.absolutepath#\admin\processpics\">
>
> <!--- Final Image Location --->
> <cfset REQUEST.picPath =
> "#REQUEST.absolutepath#\photos\">
>
> <!--- End the variables set
> ////////////////////////////////////////////////////////////////////////
> ////////--->
>
> <!--- Start the file conversion process
> ////////////////////////////////////////////////////////////////////////
> / --->
>
> <!--- Call the Tag and retreive the uploading file
> attributes using the read command --->
> <cflock name="imageprocess" timeout="10"
> type="exclusive">
>
> <cfif #VARIABLES.formFile# NEQ "">
> <CFX_Image FILE="#VARIABLES.formFile#"
> ACTION="READ">
>
> <!--- Determines the final file type format depending on
> the variables set above --->
> <cfswitch expression="#VARIABLES.converttype#">
>
> <cfcase value="B1"> <!--- convert to jpg
> --->
> <!--- If the image is
> already a jpg --->
> <cfif #IMG_TYPE# IS
> "JPEG">
> <!--- If the
> image size is greater than a specified dimension, resize it --->
> <cfif
> #IMG_HEIGHT# GT #VARIABLES.resizedim#>
>
> <CFX_Image ACTION="RESIZE"
>
> FILE="#VARIABLES.formFile#"
>
> OUTPUT="#REQUEST.picPath##VARIABLES.formFile#.jpg"
>
> BITCOUNT="24"
>
> QUALITY="100"
>
> Y="#VARIABLES.resizedim#">
> <!--- If the
> image size meets the size parameters, just copy it to a temp directory
> --->
> <cfelse>
>
> <CFX_Image ACTION="COPY"
>
> FILE="#VARIABLES.formFile#"
>
> OUTPUT="#REQUEST.picPath##VARIABLES.formFile#.jpg">
> </cfif>
>
> <!--- If the image is not a jpg,
> convert it to this format --->
> <cfelse>
> <!--- If the image size
> is greater than a specified dimension, and its not a jpg, resize then
> convert --->
> <cfif #IMG_HEIGHT# GT
> #VARIABLES.resizedim#>
> <CFX_IMAGE
> ACTION="CONVERT"
>
> FILE="#VARIABLES.formFile#"
>
> OUTPUT="#REQUEST.picPath##VARIABLES.formFile#.jpg"
>
> QUALITY="100">
>
> <CFX_IMAGE
> ACTION="RESIZE"
>
> FILE="#REQUEST.picPath##VARIABLES.formFile#.gif"
>
> OUTPUT="#REQUEST.picPath##VARIABLES.formFile#.jpg"
>
> BITCOUNT="24"
>
> QUALITY="100"
>
> Y="#VARIABLES.resizedim#">
>
> <!--- If the image meets
> the size parameter, just convert the file to jpg --->
> <cfelse>
> <CFX_IMAGE
> ACTION="CONVERT"
>
> FILE="#VARIABLES.formFile#"
>
> OUTPUT="#REQUEST.picPath##VARIABLES.formFile#.jpg"
>
> TYPE="JPEG"
>
> QUALITY="100">
> </cfif>
> </cfif>
> </cfcase>
>
> <cfcase value="B2"> <!--- convert to gif
> --->
>
> <!--- Code removed here for brevity --->
>
> </cfcase>
>
> </cfswitch>
>
> <!--- Read the final file format so that the URL
> can be written to the database --->
> <CFX_Image
> FILE="#REQUEST.picPath##VARIABLES.formFile#" ACTION="READ">
>
> <cfset  VARIABLES.formfile =
>
> </cflock>
> <!--- End the file conversion process
> ////////////////////////////////////////////////////////////////////////
> //////// --->
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to