PHP | Imagick getImageBlob() Function Last Updated : 21 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageBlob() function is an inbuilt function in PHP which is used to get the image sequence as a blob. It implements direct to the memory image format. This function returns the image sequence as string. Syntax: string Imagick::getImageBlob( void ) Parameters: This function does not accept any parameters. Return Value: This function returns a string containing the image. Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::getImageBlob() function in PHP: Program 1: php <?php // Create an Imagick Object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); header("Content-Type: image/png"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Program 2: php <?php // Create an Imagick object $image = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); header('Content-type: image/jpeg'); // Use blurImage function $image->blurImage(5, 3); // Display the output image echo $image->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.getimageblob.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageBlob() Function gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick getImagesBlob() Function The Imagick::getImageBlob() function is an inbuilt function in PHP which is used to get the all the image sequences as a blob. This function is useful for animated gifs as doing getImageBlob() on them won't work. This function implements direct to memory image formats. Syntax: string Imagick::getIma 1 min read PHP | Imagick getImageColors() Function The Imagick::getImageColors() function is an inbuilt function in PHP which is used to get the number of unique colors in the image. Syntax:  int Imagick::getImageColors( void ) Parameters: This function does not accepts any parameters. Return Value: This function returns an integer value which dete 1 min read PHP | Imagick getPage() Function The Imagick::getPage() function is an inbuilt function in PHP which is used to return the geometry of page associated with Imagick object in associative array format. Syntax: array Imagick::getPage( void ) Parameters:This function does not accept any parameter. Return Value: This function returns an 1 min read PHP | Imagick getImageLength() Function The Imagick::getImageLength() function is an inbuilt function in PHP which is used to get the length of an image object in bytes. Syntax: bool Imagick::getImageLength( void) Parameters: This function does not accept any parameter. Return Value: This function returns the image length in bytes. Below 1 min read PHP | Imagick getImageRegion() Function The Imagick::getImageRegion() function is an inbuilt function in PHP which is used to extracts a region of the image. Syntax: Imagick Imagick::getImageRegion( int $width, int $height, int $x, int $y ) Parameters:This function accepts four parameters as mentioned above and described below: $width: It 1 min read PHP | Imagick getImageBorderColor() Function The Imagick::getImageBorderColor() function is an inbuilt function in PHP which is used to get the image border color. Syntax: ImagickPixel Imagick::getImageBorderColor( void ) Parameters: This function does not accept any parameters. Exceptions: This function throws ImagickException on error. Retur 1 min read PHP | Imagick getImageType() Function The Imagick::getImageType() function is an inbuilt function in PHP which is used to get the potential image type. Syntax: int Imagick::getImageType( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value corresponding to one of IMGTYPE co 1 min read PHP | Imagick getImageSize() Function The Imagick::getImageSize() function is an inbuilt function in PHP which is used to get the image length in bytes. Syntax: int Imagick::getImageSize( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value containing the current image size 1 min read PHP | Imagick getImageFormat() Function The Imagick::getImageFormat() function is an inbuilt function in PHP which is used to get the format of a particular image in a sequence Syntax:  string Imagick::getImageFormat( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns a string of the imag 1 min read PHP | Imagick getImagePage() Function The Imagick::getImagePage() function is an inbuilt function in PHP which is used to get the page geometry of a particular image. Syntax: array Imagick::getImagePage( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns an array associated with the page 2 min read Like