PHP | Imagick getResourceLimit() Function Last Updated : 28 Nov, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::getResourceLimit() function is an inbuilt function in PHP which is used to get the specified resource limit. Syntax: int Imagick::getResourceLimit( int $type ) Parameters: This function accepts a single parameter $type which holds an integer value corresponding to one of RESOURCETYPE constants. We can also pass the constants directly like getResourceLimit(imagick::RESOURCETYPE_DISK);. List of all RESOURCETYPE constants is given below: imagick::RESOURCETYPE_UNDEFINED (0) imagick::RESOURCETYPE_AREA (1) imagick::RESOURCETYPE_DISK (2) imagick::RESOURCETYPE_FILE (3) imagick::RESOURCETYPE_MAP (4) imagick::RESOURCETYPE_MEMORY (5) imagick::RESOURCETYPE_THREAD (6) Return Value: This function returns an integer value containing specified resource limit in megabytes. Exceptions: This function throws ImagickException on error. Below given programs illustrate the Imagick::getResourceLimit() 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 Resource Limit $resourceLimit = $imagick->getResourceLimit(imagick::RESOURCETYPE_MAP); echo $resourceLimit; ?> Output: 127462465536 Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); //Get the Resource Limit $resourceLimit = $imagick->getResourceLimit(imagick::RESOURCETYPE_AREA); echo $resourceLimit; ?> Output: 127462465536 Reference: https://www.php.net/manual/en/imagick.getresourcelimit.php Comment More infoAdvertise with us Next Article PHP | Imagick getResource() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick getResource() Function The Imagick::getResource() function is an inbuilt function in PHP which is used to get the specified resource's memory usage. Syntax:  int Imagick::getResource( int $type ) Parameters: This function accepts a single parameter $type which holds an integer value corresponding to one of RESOURCETYPE 1 min read PHP | Imagick getCompressionQuality() Function The Imagick::getCompressionQuality() function is an inbuilt function in PHP which is used to get the object compression quality. Syntax: int Imagick::getCompressionQuality( void ) Parameters: This function does not accept any parameters. Return Value: This function returns an integer value on succes 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 getSize() Function 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 "ro 1 min read PHP | Imagick getCopyright() Function The Imagick::getCopyright() function is an inbuilt function in PHP which is used to returns the current ImageMagick API copyright which is used as a string. Syntax: string Imagick::getCopyright( void ) Parameter: This function does not accept any parameter. Return Value: This function returns a stri 1 min read PHP | Imagick getImageResolution() Function The Imagick::getImageResolution() function is an inbuilt function in PHP which is used to get the resolution of an image object. Syntax: bool Imagick::getImageResolution( void) Parameters: This function does not accept any parameter. Return Value: This function returns the resolution as an array. Be 2 min read Like