Skip to content
Related Articles

Related Articles

PHP | Gmagick getimagewhitepoint() Function

View Discussion
Improve Article
Save Article
  • Last Updated : 21 Jan, 2020
View Discussion
Improve Article
Save Article

The Gmagick::getimagewhitepoint() function is an inbuilt function in PHP which is used to get the chromaticity white point as an associative array with the keys “x” and “y”.

Syntax:

array Gmagick::getimagewhitepoint( void )

Parameters:This function doesn’t accepts any parameter.

Return Value: This function returns an array value containing the chromaticity white point.

Exceptions: This function throws GmagickException on error.

Below given programs illustrate the Gmagick::getimagewhitepoint() function in PHP:

Used Image:

Program 1:




<?php
  
// Create a new  Gmagick object
$gmagick = new Gmagick('geeksforgeeks.png');
  
// Get the white point
$res = $gmagick->getimagewhitepoint();
print("<pre>".print_r($res, true)."</pre>");
?>


Output:

Array
(
    [x] => 0.31270000338554
    [y] => 0.3289999961853
)

Program 2:




<?php
  
// Create a new  Gmagick object
$gmagick = new Gmagick('geeksforgeeks.png');
  
// Set the white point
$gmagick->setimagewhitepoint(5, 5);
  
// Get the white point
$res = $gmagick->getimagewhitepoint();
print("<pre>".print_r($res, true)."</pre>");
?>


Output:

Array
(
    [x] => 5
    [y] => 5
)

Reference: https://www.php.net/manual/en/gmagick.getimagewhitepoint.php

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!