I have an image window called “New
Products” This window calls the image associated
with the product. However to save space I would like to give
the image the rule of being shown at 100px wide no matter what and still be
proportionate. But some images are tall and some wide. I don’t think I can call a width and
still stay proportionate. If my assumption is correct I need to
interject logic that manages proportion. <!--- x=original image width -à <!--- y=original image height -à <!--- X=new image width -à <!--- Y=new image height -à <!--- HOW DO I pull image ht/width
attributes from the image???? -à <cfif x eq y> <cfset>
X=100 <cfset>
Y=100 <cfelse x neq y> <cfset>
X=100 <cfset>
Y=(100/X)Y </cfif> ********************************* This is the area where this needs to go: <cfscript> .... .... //'show an image if the image property is
set WriteOutput("<a
href="" &
objNewProduct.getStaticURL(baseURL,token.getIDString()) &
""" Class=""Product"">" &
chr(10) & chr(13)); WriteOutput("<img
src="" & objNewProduct.getImage1() & """
width="" X "" height="" Y ""></a><br/>"
& chr(10) & chr(13)); } ... ... </cfscript> ********************************* Any advice to make this work? Note that I need X, and Y in the second
WriteOutput string to be proportionate but where X=100 Whats nice is that I can see the study
group is helping me get this stuff quickly. Thanks group! Robert P. Reil Managing Director, Motorcyclecarbs.com,
Inc. 4292 Office 770-974-8851 Fax 770-974-8852 |
- [ACFUG Discuss] if//else algebra on image output. Robert Reil
- Re: [ACFUG Discuss] if//else algebra on image output. Dean H. Saxe
- Re: [ACFUG Discuss] if//else algebra on image output. Teddy Payne
- [ACFUG Discuss] if//else algebra on image output. Robert Reil
- RE: [ACFUG Discuss] if//else algebra on image output. Robert Reil
- RE: [ACFUG Discuss] if//else algebra on image output. Robert Reil