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:
- $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:
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, zambiatek 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!




