HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

Polaroid image

← pingImageFile   polaroidWithTextAndMethod →
Simulates a Polaroid picture. This method is available if Imagick has been compiled against ImageMagick version 6.3.2 or newer.

Example

function polaroidImage($image_path)
{
    $imagick = new \Imagick(realpath($image_path));
    $imagickDraw = new \ImagickDraw();
    $imagick->polaroidImage($imagickDraw, 15);
    header("Content-Type: image/jpeg");
    echo $imagick->getImageBlob();
}