Imagick::animateImages


wizard apg

ANIMATES one image or images.



<?php

bool 
public Imagick::animateImages(string $x_server);

?>

$x_server


The X_server address.



X_SERVER


This method is not available on Windows.

This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.





This function returns a TRUE on success.



  1 EXERCISE   

<?php

$animation 
= new Imagick();

$animation->setFormat( "gif" );

$color = new ImagickPixel( "white" );

$color->setColor( "white" );

$string = "I AM ZEROF";

$draw = new ImagickDraw();


for ( 
$i = 0; $i <= strlen( $string ); $i++ )
{

    
$part = substr( $string, 0, $i );
    
    
$animation->newImage( 100, 50, $color );
   
    
$animation->annotateImage( $draw, 10, 30, 0, $part );
   
    
$animation->setImageDelay( 30 );
}

$animation->newImage( 100, 50, $color );

$animation->annotateImage( $draw, 10, 30, 0, $string );

$animation->setImageDelay( 40 );

header( "Content-Type: image/gif" );
echo 
$animation->getImagesBlob();
?>