PHP | Imagick setImageWhitePoint() Function
Last Updated :
13 Dec, 2019
The Imagick::setImageWhitePoint() function is an inbuilt function in PHP which is used to set the image chromaticity white point.
Syntax:
bool Imagick::setImageWhitePoint( float $x, float $y )
Parameters:This function accepts two parameters as mentioned above and described below:
- $x: It specifies the x-coordinate of white point chromaticity.
- $y: It specifies the y-coordinate of white point chromaticity.
Return Value: This function returns TRUE on success.
Exceptions: This function throws ImagickException on error.
Below programs illustrate the Imagick::setImageWhitePoint() function in PHP:
Program 1:
<?php
$imagick = new Imagick(
$imagick ->setImageWhitePoint(0.65, 0.89);
$whitepoint = $imagick ->getImageWhitePoint();
print ( "<pre>" .print_r( $whitepoint , true). "</pre>" );
?>
|
Output:
Array
(
[x] => 0.65
[y] => 0.89
)
Program 2:
<?php
$imagick = new Imagick(
$imagick ->setImageWhitePoint(0.2, 0.2);
header( "Content-Type: image/png" );
echo $imagick ->getImagesBlob();
?>
|
Output:
Reference: https://www.php.net/manual/en/imagick.setimagewhitepoint.php
Share your thoughts in the comments
Please Login to comment...