Translate command-line call to Imagick method calls

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
cosmin.dorobantu

Translate command-line call to Imagick method calls

Post by cosmin.dorobantu »

Hello,

I have a big problem. I have a task where I am requested to transform some command-line imagick calls to PHP api calls and I got really stuck.
Can someone please help me with the following line of code:

Code: Select all

exec("convert {$tmpdir}/tmp.png  -matte \( +clone -matte  -virtual-pixel transparent -channel RGBA  -motion-blur 0x{$radius}+90 \) -compose DstIn -composite {$tmpdir}/shadow.png");
How can this call be best converted to a series of Imagick method calls?

Thank you in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Translate command-line call to Imagick method calls

Post by fmw42 »

it would be easier to just use the command line call with PHP exec.

for Imagick, see http://us3.php.net/manual/en/book.imagick.php
Post Reply