PHP | Imagick spliceImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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 used to set the slice width of image. $height: This parameter is used to set the slice height of image. $x: This parameter is used to set the slice position on x-axis. $y: This parameter is used to set the slice position on y-axis. Return Value: This function returns True on success. Below program illustrates the Imagick::spliceImage() function in PHP: Program: php <?php // Create an Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use spliceImage function $imagick->spliceImage(50, 100, 50, 100); header("Content-Type: image/jpg"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Related Articles: PHP | Imagick chopImage() Function PHP | Imagick vignetteImage() Function Reference: http://php.net/manual/en/imagick.spliceimage.php Comment More infoAdvertise with us Next Article PHP | Imagick spliceImage() 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 sampleImage() Function The Imagick::sampleImage() function is an inbuilt function in PHP which is used to scale an image to the desired dimensions with pixel sampling.This method does not introduce any additional color into the scaled image like other resizing methods. Syntax: bool Imagick::sampleImage( int $rows, int $co 1 min read PHP | Imagick resizeImage() Function The Imagick::resizeImage() function is an inbuilt function in PHP which is used to scale an image to the desired dimensions. Syntax: bool Imagick::resizeImage( int $columns, int $rows, int $filter, float $blur, bool $best_fit = false, bool $legacy = false ) Parameters: This function accepts six para 2 min read PHP | Imagick spreadImage() Function The Imagick::spreadImage() function is an inbuilt function in PHP which randomly displaces each pixel in a block. It is a special effects method that randomly displaces each pixel in a block defined by the radius parameter. Syntax: bool Imagick::spreadImage( $radius ) Parameters: This function accep 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 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 Like