Open In App

PHP | Imagick polaroidImage() Function

The Imagick::polaroidImage() function is an inbuilt function in PHP which is used to simulate a polaroid picture. This function rotates the image with the polaroid frame by a given angle.

Note: This method is available only if Imagick has been compiled against version 6.3.2 or above.



Syntax:

bool Imagick::polaroidImage( $properties, $angle )

Parameters: This function accepts two parameters as mentioned above and described below:



Return Value: This function returns True on success.

Original Image:

Program:




<?php
   
// Create a new object
$image = new Imagick(
   
// Use polaroidImage() function
$image->polaroidImage(new ImagickDraw(), 25);
   
// Image header
header('Content-type: image/png');
   
// Display resulting image
echo $image;
   
?>

Output:

Article Tags :