i have created a page type where i am uploading an image and i am displaying it on the page but i need to resize the image not cropped because when i am croping it cropped the image in ratio which sometime result n a very bad image so i just want to resize the image not crop my code so far is
php page
<?php
class ProfilePage extends Page {
static $db = array(
);
static $has_one = array(
'Photo' => 'Image'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Content.Images", new ImageField('Photo'));
return $fields;
}
static $defaults = array(
'ShowInMenus' => false
);
}
class ProfilePage_Controller extends Page_Controller {
}
?>
template page
<% control Photo %>
<% control CroppedImage(540,340) %>
<img src ="$URL" alt="" />
<% end_control %>
<% end_control %>
thank you in advance