@param int $width
@param int $height

@return static
507478
public function do_resize($width, $height)
    {
        if (version_compare(PHP_VERSION, '5.5.0') < 0) {
            $image = imagecreatetruecolor($width, $height);
            imagealphablending($image, false);
            imagesavealpha($image, true);

            imagecopyresampled($image, $this->_image, 0, 0, 0, 0, $width, $height, $this->_width, $this->_height);
        } else {
            $image = imagescale($this->_image, $width, $height);
        }

        imagedestroy($this->_image);
        $this->_image = $image;
        $this->_width = imagesx($image);
        $this->_height = imagesy($image);

        return $this;
    }
165344
public static function getInstanceByCreate($width, $height)
    {
        $instance = new self();

        // set image dimensions
        $instance->width = (int)$width;
        $instance->height = (int)$height;

        $instance->createImage();

        return $instance;
    }
550615
public function cropAndResizeFromCenter($width, $height)
        {
            $this->resizeOut($width, $height);
            $this->cropFromCenter($width, $height);

            return $this;
        }
973922
public function resize($width, $height)
    {

        $new = imagecreatetruecolor($width, $height);
        imagealphablending($new, false);
        imagesavealpha($new, true);
        imagecopyresampled($new, $this->image, 0, 0, 0, 0, $width, $height, $this->width, $this->height);

        $this->width = $width;
        $this->height = $height;
        $this->image = $new;

        return $this;

    }
363415
public static function createBlank($width = 1, $height = 1){

        return new self(imagecreatetruecolor($width, $height), '', $width, $height, ImageType::UNKNOWN);

    }
646567
public function getProsize(Int $width = 0, Int $height = 0)
    {
        if( ! isset($this->sets['filePath']) )
        {
            return false;
        }

        return $this->image->getProsize($this->sets['filePath'], $width, $height);
    }
1259495
private function actionResize($width, $height)
    {
        $image = $this->getPhpThumb();
        $image->resize($width, $height);
    }
1203319
static public function create($width, $height) {
		$image = imagecreatetruecolor($width, $height);
		imagealphablending($image, false);
		imagesavealpha($image, true);
		return new self($image);
	}
716267
public function resize(Int $width, Int $height) : Thumb
    {
        $this->sets['rewidth']  = $width;
        $this->sets['reheight'] = $height;

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

        return $this;
    }
1319234
public function paperSize($width,$height)
    {
        $this->paperWidth = $width;
        $this->paperHeight = $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;
	}
49360
public function item($width, $height, $length, $weight, $quantity = 1)
    {
        $this->items[] = compact('width', 'height', 'length', 'weight', 'quantity');

        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;
    }
1047369
public function fitInto($width, $height=null)
    {

        $size = $width instanceof Size ? $width : new static($width, $height);

        if (!$size->isValid()) {
            return new static($size);
        }

        $myAspectRatio = $this->aspectRatio();

        $newWidth = $size->height() * $myAspectRatio;

        if ($newWidth <= $size->width()) {
            return new static($newWidth, $size->height());
        }

        return new static($size->width(), $size->width() / $myAspectRatio);
    }
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;
    }
548663
public function cropAndResizeFromEdge($width, $height, $edge)
        {
            $this->resizeOut($width, $height);
            $this->cropFromEdge($width, $height, $edge);

            return $this;
        }