private function resize($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0, $isCrop = false)
    {
        if ($this->resource && $width > 0 && $height > 0) {
            $image = imagecreatetruecolor($width, $height);

            if ($this->isPNG()) {
                imagealphablending($image, false);
                imagesavealpha($image, true);
            }

            imagecopyresampled(
                $image,
                $this->resource,
                $dstX,
                $dstY,
                $x1,
                $y1,
                $width,
                $height,
                $isCrop ? $width : $this->width,
                $isCrop ? $height : $this->height
            );

            $this->resource = $image;
            $this->width = $this->boxWidth = imagesx($this->resource);
            $this->height = $this->boxHeight = imagesy($this->resource);
        }

        return $this;
    }
private function resize($width, $height, $x1 = 0, $y1 = 0, $dstX = 0, $dstY = 0, $isCrop = false)
    {
        if ($this->resource && $width > 0 && $height > 0) {
            $image = imagecreatetruecolor($width, $height);

            if ($this->isPNG()) {
                imagealphablending($image, false);
                imagesavealpha($image, true);
            }

            imagecopyresampled(
                $image,
                $this->resource,
                $dstX,
                $dstY,
                $x1,
                $y1,
                $width,
                $height,
                $isCrop ? $width : $this->width,
                $isCrop ? $height : $this->height
            );

            $this->resource = $image;
            $this->width = $this->boxWidth = imagesx($this->resource);
            $this->height = $this->boxHeight = imagesy($this->resource);
        }

        return $this;
    }
private function resize ( $ width , $ height , $ x1 = 0 , $ y1 = 0 , $ dstX = 0 , $ dstY = 0 , $ isCrop = false ) { if ( $ this -> resource && $ width > 0 && $ height > 0 ) { $ image = imagecreatetruecolor ( $ width , $ height ) ; if ( $ this -> isPNG ( ) ) { imagealphablending ( $ image , false ) ; imagesavealpha ( $ image , true ) ; } imagecopyresampled ( $ image , $ this -> resource , $ dstX , $ dstY , $ x1 , $ y1 , $ width , $ height , $ isCrop ? $ width : $ this -> width , $ isCrop ? $ height : $ this -> height ) ; $ this -> resource = $ image ; $ this -> width = $ this -> boxWidth = imagesx ( $ this -> resource ) ; $ this -> height = $ this -> boxHeight = imagesy ( $ this -> resource ) ; } return $ this ; }
Resizes the image.

@access private
@param int $width Image's width.
@param int $height Image's height.
@param int $x1 [Optional] Left position
@param int $y1 [Optional] Top position
@param int $dstX [Optional] x-coordinate of destination point.
@param int $dstY [Optional] y-coordinate of destination point.
@param bool $isCrop [Optional] if it's true resize function will crop the image.
@return \GImage\Image
Resizes the image .