You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i was looking for a way to resize an image, without squashing it or blackbars, and to make sure that all the area should be cover. I found that there is a similar method called resizeToFit ...so maybe you could add another method in the same class. It would be resizeToCover, it should work just like the CSS cover attribute. What do you think?
/**
* Resize the layer to cover a bounding box by specifying pixel
*
* @param integer $width
* @param integer $height
* @param integer $positionX
* @param integer $positionY
* @param string $position
*/
public function resizeToCover($width, $height, $px = 0, $py = 0, $position = 'MM')
{
$this->cropToAspectRatioInPixel($width, $height, $px, $py, $position);
$this->resizeInPixel($width, $height);
return $this;
}
The text was updated successfully, but these errors were encountered:
Hi, i was looking for a way to resize an image, without squashing it or blackbars, and to make sure that all the area should be cover. I found that there is a similar method called
resizeToFit
...so maybe you could add another method in the same class. It would beresizeToCover
, it should work just like the CSS cover attribute. What do you think?The text was updated successfully, but these errors were encountered: