Advertisement

06.16.2008 at 11:42PM PDT, ID: 23490549
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.5

upload-resize  multiple image

Asked by panosms in ColdFusion Application Server, Cold Fusion Markup Language

Tags: ,

Hello experts.
I have a working code for uploading and resizing one image.
Now i want these to work for more than one image and
get the values of the uploaded images and thumbs into a DB.
The DB is Like:
Photo
Art_id  int
foto_1 varchar
foto_2 varchar
foto_1_thumb varchar
foto_2_thumb  varchar.
Below is the code for one image:Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
<!---
   Create folder structure or change to fit your needs
   Expects images to be uploaded to images and thumbnails go in thumbs
--->
 
 
<!--- set the full path to the images folder --->
<cfset mediapath = expandpath('./image')>
 
<!--- set the desired image height ---->
<cfset thumbsize = 75>
 
<!--- set the desired image width --->
<cfset imagesize = 320>
 
 
<cfif structKeyExists(form,"foto1") and len(form.foto1)>
   <cffile action="upload"
   filefield="foto1"
   destination="#MediaPath#"
   nameconflict="makeunique">
   
   <!--- read the image ---->
   <cfimage name="uploadedImage"
   source="#MediaPath#/#file.serverFile#" >
 
   <!--- figure out which way to scale the image --->
   <cfif uploadedImage.width gt uploadedImage.height>
         <cfset thmb_percentage = (thumbsize / uploadedImage.width)>
         <cfset percentage = (imagesize / uploadedImage.width)>
      <cfelse>
         <cfset thmb_percentage = (thumbsize / uploadedImage.height)>
         <cfset percentage = (imagesize / uploadedImage.height)>
  </cfif>
   
   <!--- calculate the new thumbnail and image height/width --->
   <cfset thumbWidth = round(uploadedImage.width * thmb_percentage)>
   <cfset thumbHeight = round(uploadedImage.height * thmb_percentage)>
 
   <cfset newWidth = round(uploadedImage.width * percentage)>
   <cfset newHeight = round(uploadedImage.height * percentage)>
 
   <!--- see if we need to resize the image, maybe it is already smaller than our desired size --->
   <cfif uploadedImage.width gt imagesize>
         <cfimage action="resize"
       height="#newHeight#"
       width="#newWidth#"
       source="#uploadedImage#"
      destination="#MediaPath#/#file.serverFile#"
       overwrite="true"/>
  </cfif>
 
    <!--- create a thumbnail for the image --->
  <cfimage action="resize"
    height="#thumbHeight#"
    width="#thumbWidth#"
    source="#uploadedImage#"
    destination="#MediaPath#/thumb/#file.serverFile#"
    overwrite="true"/>
   
   <cfoutput>
     <img src="image/thumb/#file.serverFile#" height="#thumbHeight#" width="#thumbWidth#" align="left" hspace="10"><br>
 
      Original Image: #uploadedImage.width#x#uploadedImage.height#<br>
      Resized Image: #newWidth#x#newHeight#<br>
    Thumbnail: #thumbWidth#x#thumbHeight#<br><br>
      <a href="image/#file.serverFile#">See Image</a><br>
      
   </cfoutput>
</cfif>   
 
<form action="test1.cfm" method="post" enctype="multipart/form-data">
   <label for="fileUpload">Choose Image: </label>
   <input  type="file" name="foto1"  id="foto1"  />
   <input type="submit" value="Upload Image">
</form>
[+][-]06.17.2008 at 05:32AM PDT, ID: 21802223

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, Cold Fusion Markup Language
Tags: ADOBE, Coldfusion
Sign Up Now!
Solution Provided By: dgrafx
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.17.2008 at 06:44AM PDT, ID: 21802872

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 06:48AM PDT, ID: 21802921

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 06:54AM PDT, ID: 21803005

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 06:58AM PDT, ID: 21803065

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:00AM PDT, ID: 21803086

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:04AM PDT, ID: 21803141

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:09AM PDT, ID: 21803201

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:33AM PDT, ID: 21803409

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:38AM PDT, ID: 21803454

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:54AM PDT, ID: 21803676

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 07:56AM PDT, ID: 21803699

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 08:09AM PDT, ID: 21803889

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 10:44AM PDT, ID: 21805579

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 10:30PM PDT, ID: 21810284

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 05:15AM PDT, ID: 21812011

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 05:34AM PDT, ID: 21812120

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 05:51AM PDT, ID: 21812244

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 05:55AM PDT, ID: 21812266

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 05:57AM PDT, ID: 21812276

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 06:05AM PDT, ID: 21812362

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 06:11AM PDT, ID: 21812420

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.18.2008 at 06:28AM PDT, ID: 21812595

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 06:34AM PDT, ID: 21812654

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 06:52AM PDT, ID: 21812837

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 07:01AM PDT, ID: 21812935

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 07:25AM PDT, ID: 21813210

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 07:33AM PDT, ID: 21813313

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 07:49AM PDT, ID: 21813495

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:13AM PDT, ID: 21813779

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:19AM PDT, ID: 21813852

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:19AM PDT, ID: 21813853

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:22AM PDT, ID: 21813891

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628