We add products daily, potentially by the
gobs. Images are named by partno.jpg. This leads into what I discussed
yesterday. We have 2 images potentially. The DB has an IMAGE1, and IMAGE2 listing a
path to the image. Most images are vendor supplied and can be
FTP’d or transferred from cd, or exported from a PDF export and renamed. Anyways the thought of changing the images
in photoshop by the masses is just too much to manage. This logic below would solve our problem. Matter of fact we could take it a step
further and make the X constant of 100pixels to some percentage table width
from client resolution etc, or some variable gotten from some other location. But starting small here is where I am with
it. I am led to belive from experience that (well
let me try Dean’s width=100 and remove the height.) WELL DEAN IT WORKS! So much for all that logic waste. Thanks! Robert P. Reil Managing Director, Motorcyclecarbs.com,
Inc. 4292 Office 770-974-8851 Fax 770-974-8852 From: Teddy Payne
[mailto: How often do you add new
products? How do you upload the images? On 7/28/06, 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