Converting a 'convert' command to PerlMagick?

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.

Converting a 'convert' command to PerlMagick?

Post by SmallWalrus »


Sorry if this is a basic question, I've found this effect that I really like from this page:

And the convert command is like this:
convert thumbnail.gif \
\( +clone -threshold -1 -virtual-pixel black \
-spread 10 -blur 0x3 -threshold 50% -spread 1 -blur 0x.7 \) \
+matte -compose Copy_Opacity -composite torn_paper.png

How is that command applied? Is it a sequence? How do I translate it into perl?



Re: Converting a 'convert' command to PerlMagick?

Post by wpns »

What have you tried? The Perl syntax is a bit sideways of what the command-line syntax is, but once you figure it out the learning curve eases out. I'd start small with something like:

$image->Border has the details in mind-numbing complexity, while
/root/ImageMagick-6.5.6-10/PerlMagick/demo/ has some demo programs, including, which has a very simple demo of lots of functions.

While I'm certainly no expert, I suspect you need to do this in several steps.

That is a nice effect, let us know what you come up with!