PHP | imagegetclip() Function Last Updated : 30 Jan, 2020 Comments Improve Suggest changes Like Article Like Report The ImagickDraw::imagegetclip() function is an inbuilt function in PHP which is used to get the current clipping rectangle, i.e. the area beyond the no of pixels will be drawn. Default clipping area is the whole image which can be customized using imagesetclip() function. Syntax: array ImagickDraw::imagegetclip( resource $image ) Parameters: This function accepts a single parameter $image which holds the image. Return Value: This function returns array containing the clipping area. Below examples illustrate the ImagickDraw::imagegetclip() function in PHP: Example 1: php <?php // Create an image $im = imagecreatefrompng( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Get the clipping area print("<pre>".print_r(imagegetclip($im), true)."</pre>"); ?> Output: Array ( [0] => 0 [1] => 0 [2] => 666 [3] => 183 ) Program 2: php <?php // Create an image $im = imagecreatefrompng( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Set the clip area imagesetclip($im,100, 100, 200, 300); // Get the clipping area print("<pre>".print_r(imagegetclip($im), true)."</pre>"); ?> Output: Array ( [0] => 100 [1] => 100 [2] => 200 [3] => 183 ) Reference: https://www.php.net/manual/en/function.imagegetclip.php Create Quiz Comment G gurrrung Follow 0 Improve G gurrrung Follow 0 Improve Article Tags : Web Technologies PHP PHP-function Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like