@param int $width
@param int $height
@param int $offsetX
@param int $offsetY

@return static
768524
public function do_crop($width, $height, $offsetX = 0, $offsetY = 0)
    {
        $this->_image->cropImage($width, $height, $offsetX, $offsetY);
        $this->_image->setImagePage($width, $height, 0, 0);

        $this->_width = $this->_image->getImageWidth();
        $this->_height = $this->_image->getImageHeight();

        return $this;
    }
398815
public function resize($width, $height) {
        if ($width && $height) $this->thumb->resize($width, $height);
        else if (!$width) $this->thumb->resize(99999, $height);
        else if (!$height) $this->thumb->resize($width, 99999);
        return $this;
    }
442982
public function ThumbnailURL($width, $height)
    {
        $object = $this->getObjectLatestVersion();
        if ($object instanceof Thumbnail) {
            return $object->ThumbnailURL($width, $height);
        }
        return null;
    }
1130336
public function forceResize($width = null, $height = null, $background = 'transparent')
    {
        return $this->resize($width, $height, $background, true);
    }
916561
protected function makeCircle($width, $height)
    {
        list($ox, $oy, $px, $py) = $this->getCoordinates($width, $height);

        $circle = new ImagickDraw();
        $circle->setFillColor('white');
        $circle->circle($ox, $oy, $px, $py);

        return $circle;
    }
853524
public static function create($x, $y, $width, $height) : Box
    {
        return new self($x, $y, $width, $height);
    }
431572
public function newImage($width, $height, $background = null)
    {
        // create empty resource
        $core = imagecreatetruecolor($width, $height);
        $image = new \Intervention\Image\Image(new static, $core);

        // set background color
        $background = new Color($background);
        imagefill($image->getCore(), 0, 0, $background->getInt());

        return $image;
    }
361120
public static function rectangle(Point $corner, $width, $height, $ccw = false)
	{
		$points = new Points($corner);
		$points->addPoint($corner);
		$points->addPoint($corner)->translateX($width);
		$points->addPoint($corner)->translate($width, $height);
		$points->addPoint($corner)->translateY($height);
		$points->reverseIfCcw($ccw);
		return $points;
	}
124445
public function makeThumb($width = null, $height = null, array $options = [])
    {
        $this->createThumb($this, $width, $height, $options);
        return $this;
    }
542913
public function resizeTo(
        int $width,
        int $height,
        bool $maintain_aspect = true,
        array $canvas_color = array('r' => 255, 'g' => 255, 'b' => 255)
    ) : ImageResize
    {
        if ($this->resizer !== null) {
            try {
                $this->resizer->setOptions($width, $height, $this->quality, $maintain_aspect, $canvas_color);
            } catch (\Exception $e) {
                echo $e->getMessage();
            }
        }

        return $this;
    }
737215
public function croppedResize($width, $height)
    {
        return $this->createCloneWithResource(
            function (InterventionImage $resource) use ($width, $height) {
                return $resource->fit($width, $height);
            }
        );
    }
941821
public function resize($width, $height, $x = 0, $y = 0)
    {
        if ( !$this->newImage )
        {
            $this->create($width, $height);
        }

        if ( !is_numeric($width) ) {
            throw new \InvalidArgumentException('$width must be numeric');
        }

        if ( !is_numeric($height) ) {
            throw new \InvalidArgumentException('$height must be numeric');
        }

        $type = $this->source['type'];

        imagecopyresampled(
            $this->newImage,
            $this->sourceImage,
            0, 0,
            $x, $y,
            $width, $height,
            $this->source['width'], $this->source['height']);

        return $this;
    }
594762
public function subtract($width, $height=null)
    {
        if ($width instanceof Size) {
            $height = $width->height();
            $width = $width->width();
        }

        $height = $height ? $height : $width;

        return new static($this->width()-$width, $this->height()-$height);
    }
176435
public function resize($width, $height = null, $aspectRatio = Image::RESIZE_IGNORE): Image
	{
		$this->processor->resize($width, $height, $aspectRatio);

		return $this;
	}
157131
public function setResolution($width, $height)
    {
        $this->width = $width;
        $this->height = $height;
        return $this;
    }
455851
static function lorempixel($width, $height, $category = null, $grayscale = null) {

		$defaults = [
			'category' => 'technics',
			'grayscale' => true,
		];

		if ($category == null) {
			$category = $defaults['category'];
		}

		if ($grayscale == null) {
			$grayscale = $defaults['grayscale'];
		}

		return static::instance('lorempixel', [
			'width' => $width,
			'height' => $height,
			'category' => $category,
			'grayscale' => $grayscale,
		]);
	}
16699
public function resize(int $width = 0, int $height = 0) : ImageInterface
    {
        $this->operations[] = [ __FUNCTION__, func_get_args() ];
        return $this;
    }