PHP | Imagick sketchImage() Function Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The Imagick::sketchImage() function is an inbuilt function in PHP which is used to simulates a pencil sketch. This function convolves the image with a Gaussian operator of the given radius and standard deviation. Syntax: bool Imagick::sketchImage( $radius, $sigma, $angle ) Parameters: This function accepts three parameters as mentioned above and described below: $radius: This parameter is used to set the radius of the Gaussian, in pixels, not counting the center pixel. $sigma: This parameter is used to set the standard deviation of the Gaussian, in pixels. $angle: This parameter is used to set the angle to apply the effect. Return Value: This function returns True on success. Below program illustrates the Imagick::sketchImage() function in PHP: Program: php <?php // Create an Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use sketchimage function $imagick->sketchimage(5, 1, 45); header("Content-Type: image/jpg"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Related Articles: PHP | Imagick getImageWidth() Function PHP | Imagick chopImage() Function Reference: https://www.php.net/manual/en/imagick.sketchimage.php Comment More infoAdvertise with us Next Article PHP | Imagick setImagePage() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP Image-Processing PHP-function PHP-Imagick +2 More Practice Tags : Misc Similar Reads PHP | Imagick setPage() Function The Imagick::setPage() function is an inbuilt function in PHP which is used to set the page geometry of the Imagick object. Syntax: bool Imagick::setPage( int $width, int $height, int $x, int $y ) Parameters:This function accepts four parameters as mentioned above and described below: $width: It spe 2 min read PHP | Imagick setImagePage() Function The Imagick::setImagePage() function is an inbuilt function in PHP which is used to set the image page geometry. Syntax: bool Imagick::setImagePage(int $width, int $height, int $x, int $y ) Parameters: This function accepts four parameters as mentioned above and described below: $width: It specifies 1 min read PHP | Imagick stripImage() Function 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 func 1 min read PHP | Imagick::shaveImage() Function The Imagick::shaveImage() function is an inbuilt function in PHP which is used to shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image. Syntax: bool Imagick::shaveImage( $columns, $rows ) Parameters: This function ac 1 min read PHP | Imagick scaleImage() Function The Imagick::scaleImage() function is an inbuilt function in PHP which is used to scale the size of an image to the given dimensions. Syntax: bool Imagick::scaleImage( int $cols, int $rows, bool $bestfit = false, bool $legacy = false ) Parameters: This function accepts four parameters as mentioned a 2 min read PHP | Imagick setImageType() Function The Imagick::setImageType() function is an inbuilt function in PHP which is used to set the image type.Syntax:Â Â bool Imagick::setImageType( int $image_type ) Parameters: This function accepts a single parameter $image_type which contains an integer value corresponding to one of IMGTYPE constants. W 1 min read Like