I am having a catalog with different sized images. Some will be 200x300 some will be 300x150. But All i want to do is to resize all the image to one size which makes me to show in my home page listing.
I am trying the normal magento resize to crop tp 160x210 as follows,
<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(false)->keepAspectRatio(true)->keepFrame(false)->resize(160, 210); ?>" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
But its cropping images in different size, The images are in random height and widths 160x135, 160x156, 159x210, 150x210
Detailed answers are highly appreciated.