public function resizeExactHeight(&$image, $newHeight)
    {

        $width  = $image->getWidth();
        $height = $image->getHeight();
        $ratio  = $width / $height;

        $resizeHeight = $newHeight;
        $resizeWidth  = $newHeight * $ratio;

        $this->_resize($image, $resizeWidth, $resizeHeight);

        return $this;
    }
public function resizeExactHeight(&$image, $newHeight)
    {

        $width  = $image->getWidth();
        $height = $image->getHeight();
        $ratio  = $width / $height;

        $resizeHeight = $newHeight;
        $resizeWidth  = $newHeight * $ratio;

        $this->_resize($image, $resizeWidth, $resizeHeight);

        return $this;
    }
public function resizeExactHeight ( & $ image , $ newHeight ) { $ width = $ image -> getWidth ( ) ; $ height = $ image -> getHeight ( ) ; $ ratio = $ width / $ height ; $ resizeHeight = $ newHeight ; $ resizeWidth = $ newHeight * $ ratio ; $ this -> _resize ( $ image , $ resizeWidth , $ resizeHeight ) ; return $ this ; }
Resize image to exact height. Width is auto calculated. Useful for creating row of images with the same height.

@param Image $image
@param int $newHeight Height in pixels.

@return self
Resize image to exact height . Width is auto calculated . Useful for creating row of images with the same height .