public function resize($width, $height)
    {
        $newImage = imagecreatetruecolor($width, $height);

        $this->strategy->handleTransparency($newImage, $this->image);

        // Now resample the image
        imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());

        // And allocate to $this
        $this->image = $newImage;
    }
public function resize($width, $height)
    {
        $newImage = imagecreatetruecolor($width, $height);

        $this->strategy->handleTransparency($newImage, $this->image);

        // Now resample the image
        imagecopyresampled($newImage, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());

        // And allocate to $this
        $this->image = $newImage;
    }
public function resize ( $ width , $ height ) { $ newImage = imagecreatetruecolor ( $ width , $ height ) ; $ this -> strategy -> handleTransparency ( $ newImage , $ this -> image ) ; // Now resample the image imagecopyresampled ( $ newImage , $ this -> image , 0 , 0 , 0 , 0 , $ width , $ height , $ this -> getWidth ( ) , $ this -> getHeight ( ) ) ; // And allocate to $this $ this -> image = $ newImage ; }
Now with added Transparency resizing feature
@param int $width
@param int $height
Now with added Transparency resizing feature