пожалуйста, проверьте мой код imagemagick, где я пытаюсь добавить переменную «size», но не получаю, где именно нам нужно добавить переменную размера, как «color», «string» ...
$animation = new Imagick();
$animation->setFormat( "gif" );
$color = new ImagickPixel( "blue" );
$color->setColor( "red" );
$string = "kothi!";
$draw = new ImagickDraw();
$draw->setFont( "arial.ttf" );
for ( $i =0; $i <= 0; $i++ )
{
$part = substr( $string,100, $i);
$animation->newImage( 100, 50, $color);
$animation->annotateImage( $draw, 100, 100, 100, $part );
$animation->setImageDelay( 30 );
}
$draw->setFont( "arial.ttf" );
$animation->newImage( 100, 50, $color);
$animation->annotateImage( $draw, 10, 10, 0, $string );
$animation->setImageDelay( 120 );
header( "Content-Type: image/gif" );
echo $animation->getImagesBlob();