modifiqué un poco el método, quedando así
Código PHP:
public function crop($width, $height, $margins = false) {
$newImage = imagecreatetruecolor($width, $height);
$x = $y = 0;
if ( $this->getHeight() > $this->getWidth() ){
$this->resizeToWidth($width);
$y = ($this->getHeight() - $height) / 2;
}
else if ($this->getHeight() < $this->getWidth()){
$this->resizeToHeight($height);
$x = ($this->getWidth() - $width) / 2;
}
imagecopy($newImage, $this->_image, 0, 0, $x, $y, $width, $height);
$this->_image = $newImage;
}