protected function createTransparentImage($width, $height)
    {
        $image = @imagecreatetruecolor($width, $height);
        if (!$image) {
            throw new \Exception('Missing libgd support');
        }
        imagealphablending($image, false);
        $transparency = $this->transparentColor($image);
        imagefill($image, 0, 0, $transparency);
        imagecolordeallocate($image, $transparency);
        imagesavealpha($image, true);
        return $image;
    }
protected function createTransparentImage($width, $height)
    {
        $image = @imagecreatetruecolor($width, $height);
        if (!$image) {
            throw new \Exception('Missing libgd support');
        }
        imagealphablending($image, false);
        $transparency = $this->transparentColor($image);
        imagefill($image, 0, 0, $transparency);
        imagecolordeallocate($image, $transparency);
        imagesavealpha($image, true);
        return $image;
    }
protected function createTransparentImage ( $ width , $ height ) { $ image = @ imagecreatetruecolor ( $ width , $ height ) ; if ( ! $ image ) { throw new \ Exception ( 'Missing libgd support' ) ; } imagealphablending ( $ image , false ) ; $ transparency = $ this -> transparentColor ( $ image ) ; imagefill ( $ image , 0 , 0 , $ transparency ) ; imagecolordeallocate ( $ image , $ transparency ) ; imagesavealpha ( $ image , true ) ; return $ image ; }
Create a transparent image

@param int $width
@param int $height
@return resource
@throws \Exception
Create a transparent image