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.