Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
$project = $_GET['name'];
$bonus = $_GET['bonus'];
$id = $_GET['id'];
$type = $_GET['type'];
$anim = new Imagick();
$auxIMG = new Imagick();
$auxIMG->readImage('https://site.ru/images/'.$type.'.gif');
$draw1 = new ImagickDraw();
$draw2 = new ImagickDraw();
$pixel = new ImagickPixel( 'transparent' );
/* Новое изображение */
$auxIMG->newImage(800, 75, $pixel);
/* Черный текст */
$draw1->setFillColor('white');
$draw1->setTextAlignment(\Imagick::ALIGN_CENTER);
$draw1->setFontSize( 12 );
//$draw1->setFont('Bookman-DemiItalic');
$draw2->setFillColor('white');
$draw2->setTextAlignment(\Imagick::ALIGN_CENTER);
$draw2->setFontSize( 12 );
//$draw2->setFont('Bookman-DemiItalic');
foreach ($auxIMG as $frame) {
$frame->annotateImage($draw1,87, 260, 0, $project);
$frame->annotateImage($draw2,87, 291, 0, $bonus);
}
$anim->addImage($auxIMG);
$name = "project".$id.".gif";
$anim->writeImages($name, true);
header("Content-Type: image/gif");
echo file_get_contents($name);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question