3444 Posts in 1030 Topics by 871 members
|Go to End|
21 December 2008 at 1:37am
In my template, I show an image on the top of the page. The images have differents sizes. I want to resize image only if the image is bigger than 450px width or 250px height. For the moment, I'm using :
<% $Photo.SetWidth(450) %>
where Photo is an ImageField
The problem with this is that if the image is smaller it resize it bigger (poor quality) and if the image is vertical the resize's image is too big.
an issue ?
Thank's. Julien C.
22 December 2008 at 2:10am
but I don't know where to use it. I have to change Image.php (model) ?
22 December 2008 at 3:03am
I have found an example : http://doc.silverstripe.com/doku.php?id=recipes:customising_image
|Go to Top|