src/Uploadcare/File.php
public function crop($width, $height, $center = false, $fill_color = false)
    {
        if (!$width || !$height) {
            throw new \Exception('Please provide both $width and $height');
        }
        $result = clone $this;
        $result->operations[]['crop'] = array(
            'width' => $width,
            'height' => $height,
            'center' => $center,
            'fill_color' => $fill_color,
        );
        return $result;
    }
public function crop($width, $height, $center = false, $fill_color = false)
    {
        if (!$width || !$height) {
            throw new \Exception('Please provide both $width and $height');
        }
        $result = clone $this;
        $result->operations[]['crop'] = array(
            'width' => $width,
            'height' => $height,
            'center' => $center,
            'fill_color' => $fill_color,
        );
        return $result;
    }
Get object with cropped parameters.

@param int $width Crop width
@param int $height Crop height
@param boolean $center Center crop? true or false (default false).
@param string|boolean $fill_color Fill color. If nothing is provided just use false (default false).
@return File
@throws \Exception