3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1054 Views |
-
resize by ratio?

30 December 2009 at 10:39am
Hello,
In my template I would like to use image which will be resized by ratio, and I need to use "control" method to to that..
e.g.
<% control ResizedImage(150,150) %> - will resize image, skews if necessary
<% control CroppedImage(150,150) %> - crops imagewhat is the code for this to do resizing by ratio?
thanks a lot in advance!
-
Re: resize by ratio?

1 January 2010 at 4:44am
I presume that your images have a 1:1 relation to an object.
<% control relationName %>
$Image.SetRatioSize(80,80)
<% end_control %>
Have a look at the documentation:
http://doc.silverstripe.org/doku.php?id=image
| 1054 Views | ||
|
Page:
1
|
Go to Top |


