Change the current window's width and height.

@param int $width
@param int $height

@return $this
515903
public function changeWindowSize(int $width = 1024, int $height = 768)
    {
        $this->wd->manage()->window()->setPosition(new WebDriverPoint($width, $height));

        return $this;
    }
774659
public function setSize($width = 0, $height = 0)
    {
        if (!empty($width) && !empty($height)) {
            $this->width = $this->boxWidth = $width;
            $this->height = $this->boxHeight = $height;
        }

        return $this;
    }
449532
public function resizeH($height)
    {
        $tmpWidth = $height / $this->height * $this->width;
        $this->resize((int)$tmpWidth, (int)$height);
    }
1024711
public function resize(int $width, int $height, bool $crop = false): self
    {
        $this->image = $this->resizeImage($this->image, $width, $height, $crop);
        return $this;
    }
18350
public function thumb($width, $height)
    {
        $this->resize($width, $height)
             ->crop($width, $height);

        return $this;
    }
449110
public function setViewportSize($width, $height)
    {
        $this->viewportWidth  = (int) $width;
        $this->viewportHeight = (int) $height;

        return $this;
    }
1008906
protected function getNewHeight($width, $height) 
    {
        if ($height > 0) {
            return $height;
        }
        
        // original width : new width = original height : X
        return $width * $this->imageInfo['height'] / $this->imageInfo['width'];
    }
26277
public function resizeToHeight($height)
    {
        $width = $this->getPropWidth($height);
        $this->resize($width, $height);

        return $this;
    }
508613
public function resize_fill( $width, $height ) 
	{
		$original_aspect = $this->width / $this->height;
		$thumb_aspect = $width / $height;

		if ( $original_aspect >= $thumb_aspect )
		{
		   $new_height = $height;
		   $new_width = $this->width / ($this->height / $height);
		}
		else
		{
		   $new_width = $width;
		   $new_height = $this->height / ($this->width / $width);
		}

		$x = 0 - ( $new_width - $width ) / 2;
		$y = 0 - ( $new_height - $height ) / 2;

		$result = imagecreatetruecolor( $width, $height );
		imagecopyresampled( $result, $this->image_context, $x, $y, 0, 0, $new_width, $new_height, $this->width, $this->height );

		// overwrite the image context 
		$this->image_context = $result;

		// update properties
		$this->reload_context_info();

		// return self
		return $this;
	}
818345
public function resize($width, $height)
    {
        $this->driver->manage()->window()->setSize(
            new WebDriverDimension($width, $height)
        );

        return $this;
    }
1216151
public function resize($width, $height)
    {
        $width = (int)$width;
        $height = (int)$height;
        $tmpImage = imagecreatetruecolor($width, $height);
        imagefilledrectangle($tmpImage, 0, 0, $width, $height, $this->backgroundColor);
        imagecopyresampled($tmpImage, $this->resource, 0, 0, 0, 0, $width, $height, $this->width, $this->height);
        $this->width = $width;
        $this->height = $height;
        $this->resource = $tmpImage;
    }
784593
public function setSize($width, $height)
    {
        $this->width = $width;
        $this->height = $height;
        $this->ratioX = $width / $height;
        $this->ratioY = $height / $width;

        return $this;
    }
1305938
public function withDefaultImage(
        $width = null,
        $height = null,
        $options = null)
    {
        $this->withRenamedImage(null, null, $width, $height, $options);

        return $this;
    }
157131
public function setResolution($width, $height)
    {
        $this->width = $width;
        $this->height = $height;
        return $this;
    }
1057845
public function resize($width, $height)
    {
        return $this->createCloneWithResource(
            function (InterventionImage $resource) use ($width, $height) {
                return $resource->resize($width, $height);
            }
        );
    }
693954
public function resize($width, $height) {
		$image = imagecreatetruecolor($width, $height);
		imagecopyresampled($image, $this->_image, 0, 0, 0, 0, $width, $height, $this->width, $this->height);
		imagedestroy($this->_image);
		$this->_image = $image;
		return $this;
	}
574461
public function resizeWindow($width, $height, $name = null)
    {
        $this->driver->resizeWindow($width, $height, $name);
    }