PHP | Imagick sepiaToneImage() Function
The Imagick::sepiaToneImage() function is an inbuilt function in PHP which is used to apply a special effect to the image, similar to the effect achieved in a photo darkroom by sepia toning.
Syntax:
bool Imagick::sepiaToneImage( float $threshold )
Parameters: This function accepts a single parameter $threshold which holds the measure of the extent of the sepia toning.
Return Value: This function returns TRUE on success.
Exceptions: This function throws ImagickException on error.
Below given programs illustrate the Imagick::sepiaToneImage() function in PHP:
Program 1:
<?php
$imagick = new Imagick(
$imagick ->sepiaToneImage(20);
header( "Content-Type: image/png" );
echo $imagick ->getImageBlob();
?>
|
Output:
Program 2:
<?php
$imagick = new Imagick(
$imagick ->sepiaToneImage(90);
header( "Content-Type: image/png" );
echo $imagick ->getImageBlob();
?>
|
Output:
Reference: https://www.php.net/manual/en/imagick.sepiatoneimage.php
Last Updated :
17 Dec, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...