Change Product Images from Square to Rectangle in Magento 1.9

magento-1.9product-images

I am using Magento 1.9 and the RWD theme. My product images are rectangle, being taller than they are wide, however Magento shows them as square. How do I change this?

My largest image size is 1000×600 (Height x Width)

Best Answer

Looking at Mage_Catalog_Helper_Image->resize

/**
 * Schedule resize of the image
 * $width *or* $height can be null - in this case, lacking dimension will be calculated.
 *
 * @see Mage_Catalog_Model_Product_Image
 * @param int $width
 * @param int $height
 * @return Mage_Catalog_Helper_Image
 */
public function resize($width, $height = null)
{
    $this->_getModel()->setWidth($width)->setHeight($height);
    $this->_scheduleResize = true;
    return $this;
}

So resize by ->keepFrame(true)->resize(null, 300)