PHP | Imagick spreadImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report 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 accepts single parameter $radius which is used to set the radius to dispatch each pixel in an image. Return Value: This function returns True on success. Errors/Exceptions: This function throws ImagickException on error. Below program illustrates the Imagick::spreadImage() function in PHP: Program: php <?php // Create an Imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use spreadImage function $imagick->spreadImage(5); header("Content-Type: image/jpg"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Related Articles: PHP | Imagick getImageHeight() Function PHP | Imagick getImageWidth() Function Reference: http://php.net/manual/en/imagick.spreadimage.php Comment More infoAdvertise with us Next Article PHP | Imagick spreadImage() Function V vijay_raj Follow Improve Article Tags : Misc Web Technologies PHP Image-Processing PHP-Imagick +1 More Practice Tags : Misc Similar Reads 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 readImages() Function The Imagick::readImages() function is an inbuilt function in PHP which is used to read images from an array of filenames and associate them to a single Imagick object. Syntax: bool Imagick::readImages( array $filenames ) Parameters:This function accepts a single parameter $filenames which holds an a 2 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 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 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 PHP | Imagick readImageFile() Function The Imagick::readImageFile() function is an inbuilt function in PHP which is used to read image from open filehandle. Syntax: bool Imagick::readImageFile( resource $filename, string $fileName = NULL ) Parameters:This function accepts two parameters as mentioned above and described below: $filehandle 1 min read PHP | Imagick readImageBlob() Function The Imagick::readImageBlob() function is an inbuilt function in PHP which is used to read an image from a binary string. Syntax: bool Imagick::readImageBlob( $image, $filename ) Parameters: This function accepts two parameters as mentioned above and described below: $image: This parameter is used to 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::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 Like