1 - No gravity setting
Code: Select all
#!/usr/bin/perl -w
use strict;
use Image::Magick;
my($image);
$image = Image::Magick->new;
$image->Read('fire.jpg');
# make the display image
$image->Resize(geometry => '700x700^');
$image->Write('display.jpg');
# make the thumbnail image
$image->Resize(geometry => '150x150');
$image->Extent(geometry => '150x150', background => 'black');
$image->Write('thumbnail.jpg');
exit;
Code: Select all
...
$image->Extent(gravity => 'Center', geometry => '150x150', background => 'black');
$image->Write('thumbnail_center.jpg');
...
Code: Select all
...
$image->Extent(gravity => 'East', geometry => '150x150', background => 'black');
$image->Write('thumbnail_east.jpg');
...
Code: Select all
...
$image->Extent(gravity => 'West', geometry => '150x150', background => 'black');
$image->Write('thumbnail_west.jpg');
...
I'm using:
Windows Vista Home Basic
ActivePerl v5.10.1 build 1006
ImageMagick 6.5.7 Q16