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:
- $properties: This parameter holds the property of the Polaroid image. It can be set to ‘ImagickDraw()’ if no changes in properties are considered.
- $angle: This parameter holds the polaroid angle, through which the entire picture (with frame) are rotated.
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: