2009-05-21 9 views

risposta

14
#!/usr/bin/perl 

use strict; 
use warnings; 

use Image::Magick; 

my $image = Image::Magick->new; 
$image->read('test.jpg'); 

$image->Set(Gravity => 'Center'); 
$image->Resize(geometry => '64x64'); 
$image->Extent(geometry => '64x64'); 
$image->Write('test-out.jpg'); 

Vedere la documentazione PerlMagick.