// If the target width/height match the source, then we have nothing to do here.
if ($this->
image()->origWidth ===
$width &&
$this->
image()->origHeight ===
$height) { return $this;
} $this->width =
$width;
$this->height =
$height;
if ($maintainRatio) { $this->masterDim =
$masterDim;
$this->
reproportion();
} return $this->
_resize($maintainRatio);
} /**
* Crops the image to the desired height and width. If one of the height/width values
* is not provided, that value will be set the appropriate value based on offsets and
* image dimensions.
*
* @param int|null $x X-axis coord to start cropping from the left of image
* @param int|null $y Y-axis coord to start cropping from the top of image
*
* @return $this
*/