PerlMagick 是 ImageMagick 图像处理库的面向对象 Perl API 调用包。
示例代码:
use Image::Magick;
my($image, $x);
$image = Image::Magick->new; $x = $image->Read(‘girl.png’, ‘logo.png’, ‘rose.png’); warn “$x” if “$x”;
$x = $image->Crop(geometry=>‘100x100+100+100’); warn “$x” if “$x”;
$x = $image->Write(‘x.png’); warn “$x” if “$x”;