PHP code example of smartformer / php-imagetextoverlay
1. Go to this page and download the library: Download smartformer/php-imagetextoverlay 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/ */
smartformer / php-imagetextoverlay example snippets
$adder = new Smartformer\ImageTextOverlay\Adder('fonts/Roboto/Roboto-Regular.ttf');
$adder->addTextToJpeg('Your Text', 'input.jpeg', 'output.jpg');
$adder->addTextToPng('Your Text', 'input.png', 'output.png');