Speed up development with full-stack environments for every branch.

Learn More

How to add border to an image with imagick [PHP]

Forked from How to adaptive resize image with imagick.

715 Runs 2127 Views 1016 Copies
Saved

Saved

gtsolutions 373

gtsolutions
published 4 years ago

<?php
/**
 * PHP Imagick
 * add border to image
 */

//sending image header to proper display the image
header('Content-type: image/jpeg');

//loading the image
$image = new Imagick('images/picture.jpg');

//adding border
$image->borderImage ('#000000',20,10);
echo $image;

?>
Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).