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 (http://www.imagemagick.org/Usage/crop/#crop_equal)
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->Read($imagePath);
$pCrop->Crop(geometry => '3x3@');
$pCrop->Set(page=>'0x0+0+0');
$pCrop->Set(adjoin=> 0);
$pCrop->Read($imagePath);