Page 1 of 1

using Crop() error: geometry does not contain image

Posted: 2010-05-27T08:28:19-07:00
by chenjin824
Hi All,

I used to use Crop() in perlMagick and it worked fine, but now not for some .tiff images, it threw out some errors:

Code: Select all

my $bb = $img->Get('bounding-box');
my $x  = $img->Crop(geometry=>$bb);
warn "$x" if "$x";
Then the error message:
Exception 310: geometry does not contain image ' *.tif'
If I tried the command line as

Code: Select all

convert -crop a.tif -crop geometry +repage b.tif
, it still didn't work:
convert: geometry does not contain image '*.tif'
Does anyone know how to use Crop() reliably in PerlMagick?
Thanks!

-J