PHP | Imagick stripImage() Function Last Updated : 17 Dec, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::stripImage() function is an inbuilt function in PHP which is used to strip all profiles and comments from an image. Syntax: bool Imagick::stripImage( void ) Parameters:This function doesn’t accepts any parameter. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below given programs illustrate the Imagick::stripImage() 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'); // Set some profiles $imagick->setImageProfile('name1', 'value1'); $imagick->setImageProfile('name2', 'value2'); echo 'Before stripImage() function: <br>'; print("<pre>" . print_r($imagick-> getImageProfiles(), true) . "</pre><br>"); // Strip the image $imagick->stripImage(); echo 'After stripImage() function: <br>'; print("<pre>" . print_r($imagick-> getImageProfiles(), true) . "</pre>"); ?> Output: Before stripImage() function: Array ( [name1] => value1 [name2] => value2 ) After stripImage() function: Array ( ) Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Add a comment $imagick->commentImage("This is my comment."); echo 'Before stripImage() function: <br>'; print("<pre>" . print_r($imagick-> getImageProperty("comment"), true) . "</pre><br>"); // Strip the image $imagick->stripImage(); echo 'After stripImage() function: <br>'; print("<pre>" . print_r($imagick-> getImageProperty("comment"), true) . "</pre><br>"); ?> Output: Before stripImage() function: This is my comment. After stripImage() function: Reference: https://www.php.net/manual/en/imagick.stripimage.php Comment More infoAdvertise with us Next Article PHP | Imagick stripImage() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick trimImage() Function The Imagick::trimImage() function is an inbuilt function in PHP which is used to remove the edges from the image. Syntax: bool Imagick::trimImage( $fuzz ) Parameters: This function accepts single parameter $fuzz. The fuzz member of image defines how much tolerance is acceptable to consider two color 1 min read PHP | Imagick writeImage() Function The Imagick::writeImage() function is an inbuilt function in PHP which is used to write an image to the specified filename. This function saves the image file in the same folder where your PHP script is located. Syntax: bool Imagick::writeImage( string $filename = NULL ) Parameters: This function ac 1 min read PHP | Imagick remapImage() Function The Imagick::remapImage() function is an inbuilt function in PHP which is used to replace colors in an image with those defined by replacement. The colors are replaced with the closest possible color. Syntax: bool Imagick::remapImage( Imagick $replacement, int $dither ) Parameters:This function acce 2 min read PHP | Imagick readImage() Function The Imagick::readImage() function is an inbuilt function in PHP which is used to read an image from filename. Syntax: bool Imagick::readImage( string $filename ) Parameters:This function accepts a single parameter $filename which holds the name of the file. It can also accept URL of the file. Return 1 min read PHP | Imagick spliceImage() Function The Imagick::spliceImage() function is an inbuilt function in PHP which is used to splices a solid color into the image. Syntax: bool Imagick::spliceImage( $width, $height, $x, $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: This parameter is us 1 min read Like