Thursday, September 4, 2025
HomeLanguagesPHP | Gmagick getimagewhitepoint() Function

PHP | Gmagick getimagewhitepoint() Function

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('neveropen.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('neveropen.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

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
RELATED ARTICLES

Most Popular

Dominic
32264 POSTS0 COMMENTS
Milvus
81 POSTS0 COMMENTS
Nango Kala
6629 POSTS0 COMMENTS
Nicole Veronica
11799 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11859 POSTS0 COMMENTS
Shaida Kate Naidoo
6749 POSTS0 COMMENTS
Ted Musemwa
7025 POSTS0 COMMENTS
Thapelo Manthata
6698 POSTS0 COMMENTS
Umr Jansen
6718 POSTS0 COMMENTS