public scaleFixedWidth ( integer $width ) : static | ||
$width | integer | |
return | static |
public function scaleFixedWidth($width)
{
$_width = $this->adapter->getWidth();
$_height = $this->adapter->getHeight();
$height = (int) ($_height * $width / $_width);
$this->adapter->resize($width, $height);
return $this;
}