No repage in PerlMagick Crop()?
Posted: 2006-12-11T07:34:38-07:00
Is it possible that there is no repage available in PerlMagick's Crop()?
I do not see a repage operator in the PerlMagick doc, so I tried forcing the issue using the geometry string (!) á la the command line.
Executing the above gives two files. But identify shows the trouble - the second file is not +repaged:
The command line versions, of course, are fine:
So how do I (or can I) force a repage in PerlMagick?
Rick
I do not see a repage operator in the PerlMagick doc, so I tried forcing the issue using the geometry string (!) á la the command line.
Code: Select all
use Image::Magick;
$image1 = new Image::Magick;
$image1->Read('logo:');
$image2 = $image1->Clone();
$image1->Crop("300x200+50+75");
$image1->Write(filename=>'logocrop1.png');
$image2->Crop("300x200+50+75!");
$image2->Write(filename=>'logocrop2.png');
Code: Select all
> identify logocrop1.png
logocrop1.png PNG 300x200 640x480+50+75 DirectClass 16-bit 31.3926kb
> identify logocrop2.png
logocrop2.png PNG 300x200 640x480+50+75 DirectClass 16-bit 31.3926kb
Code: Select all
> convert logo: -crop 300x200+50+75 logocrop1.png
> convert logo: -crop 300x200+50+75! logocrop2.png
>identify logocrop1.png
logocrop1.png PNG 300x200 640x480+50+75 DirectClass 16-bit 31.3926kb
>identify logocrop2.png
logocrop2.png PNG 300x200 300x200+0+0 DirectClass 16-bit 31.373kb
Rick