PHP Imagick getImagesBlob () Function

PHP

Syntax:
string Imagick::getImagesBlob (void)
Parameters:This function takes no parameters.Returned value:This function returns a string containing images.Exceptions :this function throws an ImagickException on error.The following programs illustrate the Imagick::getImagesBlob()function in PHP:Program 1: < tbody>  
// Create a new imagick object $imagickAnimation = new Imagick ( ' https://media.engineerforengineer.org/wp-content/uploads/20191117194549/g4ganimatedcolor.gif ' );  
// Show output header ( "Content-Type: image / gif" ); echo $imagickAnimation -> getImagesBlob(); ?>
Output: Program 2:  
// Create a new one imagick object $imagickAnimation = new Imagick ( ' https://media.engineerforengineer.org/wp-content/uploads/201911 17194549 / g4ganimatedcolor.gif ' ); foreach ( $imagickAnimation as $frame ) { // Apply blur to every frame $frame -> blurImage (5, 3); }  
// Show output header ( "Content-Type: image / gif " ); echo $imagickAnimation -> getImagesBlob(); ?>
Output: Link: https://www.php.net/manual/en/imagick.getimagesblob.php



Get Solution for free from DataCamp guru