Convert Command Line script to PerlMagick (flag issues)

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
Posts: 2
Joined: 2011-08-04T06:38:31-07:00
Authentication code: 8675308

Convert Command Line script to PerlMagick (flag issues)

Post by hs2323 » 2012-03-08T07:51:39-07:00

Hi All,

I am trying to convert the following command from the command line, but can't seem to get it working in PerlMagick (don't know if it is even possible).

convert image.jpg -crop 3x3@ +repage +adjoin image_3x3@_%d.jpg (
It takes an image and divides it into (almost)equal parts(9 blocks). For some reason I can't get it to work in Perl.

Here is what I have:

Code: Select all

my $pCrop = Image::Magick->New();
$pCrop->Crop(geometry => '3x3@');
$pCrop->Set(adjoin=> 0);
It crops the image into 1 3x3 square. I even tried reordering the commands. It seems like it doesn't accept the '@' flag. Is there any way to convert the command line script at the top?

Post Reply