PHP | Imagick posterizeImage() Function Last Updated : 26 Aug, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::posterizeImage() function is an inbuilt function in PHP which is used to reduces the image to a limited number of color level. Syntax: bool Imagick::posterizeImage( $levels, $dither ) Parameters: This function accepts two parameters as mentioned above and described below: $levels: This parameter is used to set the level of color. $dither: This parameter is used to hold the dither Boolean value. Return Value: This function returns True on success. Below program illustrates the Imagick::posterizeImage() function in PHP: Program: php <?php // Create an imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png'); // Use posterizeImage function $imagick->posterizeImage(8, 'true'); // Set image format $imagick->setImageFormat('png'); header("Content-Type: image/png"); // Display the output image echo $imagick->getImageBlob(); ?> Output: Reference: http://php.net/manual/en/imagick.posterizeimage.php Comment More infoAdvertise with us Next Article PHP | Imagick posterizeImage() 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 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 solarizeImage() Function The Imagick::solarizeImage() function is an inbuilt function in PHP which is used to applies a solarizing effect to the image. The image effect achieved in a photo darkroom by selectively exposing areas of photo sensitive paper to light. Syntax: bool Imagick::solarizeImage( $threshold ) Parameters: 1 min read PHP | Imagick textureImage() Function The Imagick::textureImage() function is an inbuilt function in PHP which creates repeatedly tiles the texture image. Syntax: Imagick Imagick::textureImage( $texture_wand ) Parameter: This function accepts single parameter $texture_wand. It is an Imagick object to use as texture image. Return Value: 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 previewImages() Function The Imagick::previewImages() function is an inbuilt function in PHP which is used to quickly pin-point appropriate parameters for image processing. It tiles 9 thumbnails of the specified image with an image processing operation applied at varying strengths. Syntax: bool Imagick::previewImages( int 1 min read Like