PHP | Imagick getImageWidth() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::getImageWidth() function is an inbuilt function in PHP which is used to get the width of the image. Syntax: int Imagick::getImageWidth( void ) Parameters: This function does not accepts any parameters. Return Value: This function returns the image width in pixels. Original Image Below program illustrates the Imagick::getImageWidth() function in PHP: Program: php <?php // require_once('path/vendor/autoload.php'); // Create an Imagick Object $image = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-15.png'); // Function to get the width of image $width = $image->getImageWidth(); // Display the image width in pixel. print_r($width); ?> Output: 667 Related Articles: PHP | Imagick autoLevelImage() Function PHP | Imagick vignetteImage() Function Reference: http://php.net/manual/en/imagick.getimagewidth.php Comment More infoAdvertise with us Next Article PHP | Imagick getImageWidth() Function S sarthak_ishu11 Follow Improve Article Tags : Misc Technical Scripter Web Technologies PHP Image-Processing PHP-Imagick +2 More Practice Tags : Misc Similar Reads PHP | Gmagick getimagewidth() Function The Gmagick::getimagewidth() function is an inbuilt function in PHP which is used to get the image width which is the horizontal length of the image. Syntax: int Gmagick::getimagewidth( void ) Parameters:This function doesnât accept any parameter. Return Value: This function returns an integer value 1 min read PHP | Imagick getImageDepth() Function The Imagick::getImageDepth() function is an inbuilt function in PHP which is used to gets the depth of the image. Syntax: int Imagick::getImageDepth( void ) Parameters: This function does not accepts any parameter. Return Value: This function returns the image depth. Below programs illustrate the Im 1 min read PHP | Imagick getImageUnits() Function The Imagick::getImageUnits() function is an inbuilt function in PHP which is used to get the units of resolution of a particular image. Syntax:  int Imagick::getImageUnits( void ) Parameters: This function does not accepts any parameter.Return Value: This function returns an integer of the image un 1 min read PHP | Imagick getImageIndex() Function The Imagick::getImageIndex() function is an inbuilt function in PHP which is used to get the index of the current image. Syntax: int Imagick::getImageIndex( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an integer value containing the index of th 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 Like