private static function _createPng( $imageFile ){
        $gd = @imagecreatefrompng( $imageFile );

        if(!$gd){
            throw new \Exception( sprintf('Could not open "%s". Not a valid %s file.', $imageFile, ImageType::PNG) );
        }

        $image = new self( $gd, $imageFile, imagesx( $gd ), imagesy( $gd ), ImageType::PNG );
        $image->fullAlphaMode( true );
        return $image;
    }
private static function _createPng( $imageFile ){
        $gd = @imagecreatefrompng( $imageFile );

        if(!$gd){
            throw new \Exception( sprintf('Could not open "%s". Not a valid %s file.', $imageFile, ImageType::PNG) );
        }

        $image = new self( $gd, $imageFile, imagesx( $gd ), imagesy( $gd ), ImageType::PNG );
        $image->fullAlphaMode( true );
        return $image;
    }
private static function _createPng ( $ imageFile ) { $ gd = @ imagecreatefrompng ( $ imageFile ) ; if ( ! $ gd ) { throw new \ Exception ( sprintf ( 'Could not open "%s". Not a valid %s file.' , $ imageFile , ImageType :: PNG ) ) ; } $ image = new self ( $ gd , $ imageFile , imagesx ( $ gd ) , imagesy ( $ gd ) , ImageType :: PNG ) ; $ image -> fullAlphaMode ( true ) ; return $ image ; }
Load a PNG image.

@param string $imageFile File path to image.

@return Image
@throws \Exception
Load a PNG image .