Resizing Images Dynamically

Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default Resizing Images Dynamically

    Hey everyone,

    I need help on how to resize an image to a specified width. Normally I would
    use something like...

    <cfoutput><img src="user_files/#user_name#/images/#user_image#.gif"
    width="150" alt="#user_name#" /></cfoutput>

    This would indeed achieve my width attribute, BUT it would throw the image out
    of proportion. Is there any way I can set the width to 150px and then
    proportionally set the height attribute too?

    For example, the template recieves the link for the image which is 200px by
    300px...the width would be 150px, so I take 50px off that but then the height
    would have to be calculated resulting in 250px.

    Anyone have any ideas on how to do this?

    Many thanks in advance!!

    Confused! Guest

  2. Similar Questions and Discussions

    1. Resizing Images From a database
      Hi, can anyone help me? I have a load of images in a database which is linked and displayed to a webpage, but the images are all one size (too...
    2. Resizing Placed Images
      Hi, Would someone be able to tell me please what the difference is between the two pick tools in the upper right hand palatte? I find that...
    3. Dynamically Resizing Frames Help
      Hello, I am working on a implementation that dynamically resizes frames based off a client trigger. (in this case a textbox) The implementation...
    4. Resizing Images
      You are probably expecting too much from 32x32 pixels. Work at that size to begin with. Icon sized images must be quite simple. It's a whole area...
    5. resizing images using ASP component
      Is there any possibility to resize images using ASP? I provided one of my clients with a Content Management System using SAFileup and although I...
  3. #2

    Default Re: Resizing Images Dynamically

    When you manually fix the width and/or height attributes of the <img> tag, all
    you're doing is displaying the full-size image within the boundaries you've
    specified.

    If you want to actually alter the file's size or create a copy as a thumbnail,
    it gets more involved. For instance, you can call standard java libraries to
    manipulate the image or you can use the
    [url]http://www.alagad.com/index.cfm/name-aic[/url], which simplifies that process.

    cf_menace Guest

  4. #3

    Default Re: Resizing Images Dynamically

    Thanks, Manace.

    I was looking for something like this and somehow missed Alagad.

    MikerRoo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139