please, can you help me with creating gif image in Imagick with countdown in PHP? I need to countdown one second every second
Create gif with countdown
Create gif with countdown
Hi everybody,
please, can you help me with creating gif image in Imagick with countdown in PHP? I need to countdown one second every second
so a need create one frame every second. Thank you werixon
please, can you help me with creating gif image in Imagick with countdown in PHP? I need to countdown one second every second
Re: Create gif with countdown
Hi, so I have this code. Now I try to create 120 frames for 120 and open at the browser. But a got error - empty screen.
Code: Select all
$GIF = new Imagick();
$GIF->setFormat("gif");
$draw = new ImagickDraw();
$draw->setFillColor('black');
$draw->setFont('Bookman-DemiItalic');
$draw->setFontSize( 30 );
for ($i = 0; $i <= 120; ++$i) {
$frame = new Imagick();
$frame->newImage(100, 100, new ImagickPixel("red"));
$frame->setImageDelay(10);
$frame->annotateImage($draw, 10, 45, 0, $i);
$GIF->addImage($frame);
}
header('Content-type: image/gif');
echo $GIF->getImagesBlob();