src/Modules/Imager/GDDriver.php
public function crop($width, $height, $x = 0, $y = 0)
    {
        if ($width > ($max_width = $this->width - $x)) {
            $width = $max_width;
        }

        if ($height > ($max_height = $this->height - $y))
            $height = $max_height;

        $cropped = $this->createGD($width, $height);
        imagecopy($cropped, $this->image_handler, 0, 0, $x, $y, $width, $height);
        $this->setImage($cropped, $width, $height);

        return $this;
    }
public function crop($width, $height, $x = 0, $y = 0)
    {
        if ($width > ($max_width = $this->width - $x)) {
            $width = $max_width;
        }

        if ($height > ($max_height = $this->height - $y))
            $height = $max_height;

        $cropped = $this->createGD($width, $height);
        imagecopy($cropped, $this->image_handler, 0, 0, $x, $y, $width, $height);
        $this->setImage($cropped, $width, $height);

        return $this;
    }
@param integer $width
@param integer $height
@param integer $x
@param integer $y

@return $this