Create image from text. Custom text, text angle, text padding, font size and font type.
These instructions will get you a copy of the project up and running
Install with Composer
composer require hracik/php-create-image-from-text
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);
This is how it will look
Run
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests
For Windows platforms
./vendor/bin/phpunit.bat --bootstrap vendor/autoload.php tests
- PHPUnit - The PHP Testing Framework
- PHP: imagettfbbox - Manual
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Andrej Lahucky - Initial work - Hracik
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- PurpleBooth