PHP | Imagick setImageGreenPrimary() Function Last Updated : 21 Nov, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::setImageGreenPrimary() function is an inbuilt function in PHP which is used to set the image chromaticity green primary point. Syntax: bool Imagick::setImageGreenPrimary( float $x, float $y ) Parameters: This function accept two parameters as mentioned above and described below: $x: It specifies the green primary x-point. $y: It specifies the green primary y-point. Return Value: This function returns TRUE on success. Exceptions: This function throws ImagickException on error. Below programs illustrate the Imagick::setImageGreenPrimary() function in PHP: Program 1: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/20190823154611/geeksforgeeks24.png'); // Use setImageGreenPrimary() function $imagick->setImageGreenPrimary(9, 11); // Use getImageGreenPrimary() function $result = $imagick->getImageGreenPrimary(); print_r($result); ?> Output: Array ( [x] => 9 [y] => 11 ) Program 2: php <?php // Create a new imagick object $imagick = new Imagick( 'https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png'); // Use setImageGreenPrimary() function $imagick->setImageGreenPrimary(0.2, 0.8); // Display the image $imagick->setformat('png'); header("Content-Type: image/png"); echo $imagick->getImageBlob(); ?> Output: Reference: https://www.php.net/manual/en/imagick.setimagegreenprimary.php Comment More infoAdvertise with us Next Article PHP | Imagick setImageGreenPrimary() Function G gurrrung Follow Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Similar Reads PHP | Imagick setImageRedPrimary() Function The Imagick::setImageRedPrimary() function is an inbuilt function in PHP which is used to set the image chromaticity red primary point. Syntax: bool Imagick::setImageRedPrimary( float $x, float $y ) Parameters: This function accept two parameters as mentioned above and described below: $x: It specif 1 min read PHP | Imagick setImageBluePrimary() Function The Imagick::setImageBluePrimary() function is an inbuilt function in PHP which is used to set the image chromaticity blue primary point. Syntax: bool Imagick::setImageBluePrimary( float $x, float $y ) Parameters: This function accept two parameters as mentioned above and described below: $x: It spe 1 min read PHP | Imagick setImageGravity() Function The Imagick::setImageGravity() function is an inbuilt function in PHP which is used to set the gravity property of an image. Difference between setGravity() and setImageGravity() is that the former applies for the whole Imagick object whereas the latter sets the gravity of the current image (in case 1 min read PHP | Imagick setImageProperty() Function The Imagick::setImageProperty() function is an inbuilt function in PHP which is used to set the image property. The main difference between image properties and image artifacts is that the properties are public whereas artifacts are private. Syntax: bool Imagick::setImageProperty( string $name, stri 1 min read PHP | Imagick setImageGamma() Function The Imagick::setImageGamma() function is an inbuilt function in PHP which is used to set the image gamma. Syntax: bool Imagick::setImageGamma( float $gamma ) Parameters: This function accepts a single parameter $gamma which holds the gamma for the image. Return Value: This function returns TRUE on s 1 min read Like