Skip to content
Related Articles

Related Articles

PHP | Imagick getImageRenderingIntent() Function

View Discussion
Improve Article
Save Article
  • Last Updated : 26 Aug, 2019

The Imagick::getImageRenderingIntent() function is an inbuilt function in PHP which is used to get the image rendering intent.


bool Imagick::getImageRenderingIntent( void )

Parameters: This function does not accept any parameter.

Return Value: This function returns the rendering intent of image.

Below programs illustrate the Imagick::getImageRenderingIntent() function in PHP:

Program 1:
Original Image:

// Create new Imagick object
$imagick = new Imagick(
// Using getImageRenderingIntent function
$res = $imagick->getImageRenderingIntent();
// Display result



Program 2:
Original Image:

$string = "Computer Science portal for Geeks!"
// Creating new image of above String 
// and add color
$im = new Imagick(); 
$draw = new ImagickDraw(); 
// Fill the color in image 
$draw->setFillColor(new ImagickPixel('green')); 
// Set the text font size 
$metrix = $im->queryFontMetrics($draw, $string); 
$draw->annotation(0, 40, $string); 
$im->newImage($metrix['textWidth'], $metrix['textHeight'], 
        new ImagickPixel('white')); 
// Draw the image         
// Using getImageRenderingIntent function
$res = $im->getImageRenderingIntent();
echo "Before: " . $res . "</br>";
// Set image renderingintent 
// Using getImageRenderingIntent function
$res = $im->getImageRenderingIntent();
// Display result
echo "After " . $res;


Before: 2
After 8 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!