PHP | Imagick getSize() Function Last Updated : 28 Nov, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::getSize() function is an inbuilt function in PHP which is used to get the size associated with the imagick object. Syntax: array Imagick::getSize( void ) Parameters: This function doesn’t accepts any parameter. Return Value: This function returns an array with the keys "columns" and "rows". Exceptions: This function throws ImagickException on error. Below given programs illustrate the Imagick::getSize() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Get the size $size = $imagick->getSize(); print("<pre>".print_r($size, true)."</pre>"); ?> Output: Array ( [columns] => 0 [rows] => 0 ) Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the size $imagick->setSize('200', '400'); // Get the size $size = $imagick->getSize(); print("<pre>".print_r($size, true)."</pre>"); ?> Output: Array ( [columns] => 200 [rows] => 400 ) Reference: https://www.php.net/manual/en/imagick.getsize.php Comment More infoAdvertise with us Next Article PHP | Imagick getPointSize() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Gmagick getsize() Function The Gmagick::getsize() function is an inbuilt function in PHP which is used to get the size associated with the Gmagick object. Syntax: array Gmagick::getsize( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns an associative array containing the keys 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 getPointSize() Function The Imagick::getPointSize() function is an inbuilt function in PHP which is used to get the point size of the imagick object. Syntax: float Imagick::getPointSize( void ) Parameters:This function doesnât accepts any parameter. Return Value: This function returns a float value containing the point siz 1 min read PHP | Imagick getSizeOffset() Function The Imagick::getSizeOffset() function is an inbuilt function in PHP which is used to get the size offset. Syntax: int Imagick::getSizeOffset( void ) Parameters: This function doesnât accepts any parameter. Return Value: This function returns an integer value containing the size offset. Exceptions: T 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 | ImagickDraw getFontSize() Function The ImagickDraw::getFontSize() function is an inbuilt function in PHP which is used to get the font pointsize used when annotating with text. Syntax: float ImagickDraw::getFontSize( void ) Parameters: This function doesnât accept any parameter. Return Value: This function returns a float value conta 1 min read Like