PHP code example of hracik / php-create-image-from-text

1. Go to this page and download the library: Download hracik/php-create-image-from-text library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hracik / php-create-image-from-text example snippets


use Hracik\CreateImageFromText;

//possible return options are: RETURN_BASE64_IMG, RETURN_BASE64, RETURN_RESOURCE
$image = CreateImageFromText::createImageFromText($text, 0, 10, 12, null, CreateImageFromText::RETURN_BASE64_IMG);

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests

./vendor/bin/phpunit.bat --bootstrap vendor/autoload.php tests