public function crop($wid, $hgt, $x = 0, $y = 0)
{
// Create a new image output resource.
$this->createResource();
$this->output = imagecreatetruecolor($wid, $hgt);
// Copy newly sized image to the output resource.
$this->copyImage($this->width, $this->height, $x, $y);
return $this;
}