Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any good image-manipulating APIs (ImageMagick alternatives) for PHP? [closed]

My host (wooservers) does not have ImageMagick installed on their shared servers so I was wondering if there was any image manipulation library/plugin I could use?

(Mainly to watermark GIF animations.)

As the only way I've found to watermark GIF animations was through ImageMagick

My host does not have ImageMagick installed on their shared servers. So I was wondering if there was any other way to use ImageMagick-like capabilities to watermark animated GIFs?

(Maybe like a web-service that allows me to send them the image with specifications on how to process the image, and they do the processing and I get my image back? Something of that sort? Which I believe is called an API?)

like image 466
Jeromie Devera Avatar asked Mar 19 '23 02:03

Jeromie Devera


1 Answers

You should take a look at Intervention . It's one of the best PHP image libraries I've used and can utilize both GD and Imagick as drivers.

Per the documentation, you can create watermarks like so:

// create new Intervention Image
$img = Image::make('public/foo.jpg');

// paste another image
$img->insert('public/bar.png');

// create a new Image instance for inserting
$watermark = Image::make('public/watermark.png');
$img->insert($watermark, 'center');

// insert watermark at bottom-right corner with 10px offset
$img->insert('public/watermark.png', 'bottom-right', 10, 10);
like image 194
djt Avatar answered Apr 06 '23 21:04

djt