PHP code example of vallefor / eva-social-img-generator
1. Go to this page and download the library: Download vallefor/eva-social-img-generator 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/ */
vallefor / eva-social-img-generator example snippets
use Eva\Social\imgGenerator as imgGenerator;
use Eva\Social\imgTextGenerator as imgTextGenerator;
$textGenerator = new imgTextGenerator();
$text=$textGenerator
->seTextShadow("#000000", 75, 1, 2, 2)
->setText("Направление деятельности АО «МОСГАЗ»","#ffffff",imgGenerator::position_left_bottom,"auto",'5%')
->setFont($_SERVER["DOCUMENT_ROOT"]."/upload/fonts/fonts2_7/hinted-PTF55F.ttf");
$generator = new imgGenerator();
$generator
->addText($text)
->addOverlay(0.5, "#999900")
->setLogo($_SERVER["DOCUMENT_ROOT"] . "/images/logo.png", imgGenerator::position_left_top, "5%",'auto')
->fromImg($_SERVER["DOCUMENT_ROOT"] . "/images/background.jpeg")
->resizeFor("autodetect")
->show();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.