Skip to main content
Inspiring
March 4, 2011
Question

cfimage resize and keep ratio

  • March 4, 2011
  • 1 reply
  • 946 views

I use CF8,

Using CFIMAGE for resize, ask for height and width,

I only want to give width , then height should keep the same ratio.

But it wants an height value.

So this means I have to calculate the final height relative to the given width ?

Is there a way to give the width or the height and that tag keep the ration for the other value ?

Thanks for any help.

Pierre.

This topic has been closed for replies.

1 reply

Fernis
Inspiring
March 7, 2011

Use the corresponding ImageResize() function. You can leave the height value as blank.

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_39.html

-Fernis

plartsAuthor
Inspiring
March 20, 2011

Yes, I used imageResize() function, then it does work fine.

Thanks.

So <cfimage with resize is not really isefull.

Pierre.