PHP | Imagick addNoiseImage() Function
Last Updated :
26 Aug, 2019
The Imagick::addNoiseImage() function is an inbuilt function in PHP which is used to add noise in given image. The intensity of noise depends on noise constants and channel types. The image noise is the random variation of brightness and contrast in an image.
Syntax:
bool Imagick::addNoiseImage ( $noise_type, $channel )
Parameters: This function accepts two parameters as mentioned above and described below:
Return Value: This function returns TRUE on success.
Below program illustrate the Imagick::addNoiseImage() function in PHP:
Original Image:
Program:
<?php
header( 'Content-type: image/png' );
$image = new Imagick(
$image ->addNoiseImage(3, imagick::CHANNEL_DEFAULT);
echo $image ;
?>
|
Output:
Reference: http://php.net/manual/en/imagick.addnoiseimage.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...