src/Modifiers/ImageModifier.php
protected function createCanvas($width, $height)
    {
        // Create the canvas element
        $canvas = imagecreatetruecolor( $width, $height );

        // Check if we should preserve the transparency
        if ( $this->imageType == IMAGETYPE_GIF || $this->imageType == IMAGETYPE_PNG ) {
            imagealphablending( $canvas, false );
            imagesavealpha( $canvas, true );
        }

        // Return the canvas
        return $canvas;
    }
protected function createCanvas($width, $height)
    {
        // Create the canvas element
        $canvas = imagecreatetruecolor( $width, $height );

        // Check if we should preserve the transparency
        if ( $this->imageType == IMAGETYPE_GIF || $this->imageType == IMAGETYPE_PNG ) {
            imagealphablending( $canvas, false );
            imagesavealpha( $canvas, true );
        }

        // Return the canvas
        return $canvas;
    }
protected function createCanvas ( $ width , $ height ) { // Create the canvas element $ canvas = imagecreatetruecolor ( $ width , $ height ) ; // Check if we should preserve the transparency if ( $ this -> imageType == IMAGETYPE_GIF || $ this -> imageType == IMAGETYPE_PNG ) { imagealphablending ( $ canvas , false ) ; imagesavealpha ( $ canvas , true ) ; } // Return the canvas return $ canvas ; }
Create a new canvas element

@return Resource
Create a new canvas element