function crop($x1,$y1,$x2,$y2) {
		$tmp=imagecreatetruecolor($width=$x2-$x1+1,$height=$y2-$y1+1);
		imagesavealpha($tmp,TRUE);
		imagefill($tmp,0,0,IMG_COLOR_TRANSPARENT);
		imagecopyresampled($tmp,$this->data,
			0,0,$x1,$y1,$width,$height,$width,$height);
		imagedestroy($this->data);
		$this->data=$tmp;
		return $this->save();
	}
function crop($x1,$y1,$x2,$y2) {
		$tmp=imagecreatetruecolor($width=$x2-$x1+1,$height=$y2-$y1+1);
		imagesavealpha($tmp,TRUE);
		imagefill($tmp,0,0,IMG_COLOR_TRANSPARENT);
		imagecopyresampled($tmp,$this->data,
			0,0,$x1,$y1,$width,$height,$width,$height);
		imagedestroy($this->data);
		$this->data=$tmp;
		return $this->save();
	}
function crop ( $ x1 , $ y1 , $ x2 , $ y2 ) { $ tmp = imagecreatetruecolor ( $ width = $ x2 - $ x1 + 1 , $ height = $ y2 - $ y1 + 1 ) ; imagesavealpha ( $ tmp , TRUE ) ; imagefill ( $ tmp , 0 , 0 , IMG_COLOR_TRANSPARENT ) ; imagecopyresampled ( $ tmp , $ this -> data , 0 , 0 , $ x1 , $ y1 , $ width , $ height , $ width , $ height ) ; imagedestroy ( $ this -> data ) ; $ this -> data = $ tmp ; return $ this -> save ( ) ; }
Crop the image
@return object
@param $x1 int
@param $y1 int
@param $x2 int
@param $y2 int
Crop the image