Image Manipulation with Perl
Image Manipulation and Resizing
|
|
[ home ]
-
[ search ]
-
[ sitemap ]
Since GD 2.0.5 is a pain, I'm trying to get Image::Magick up and running. For those who are prepared for an adventure, the latest stable version of GD seems to be GD-1.19.tar.gz
Links
http://www.imagemagick.org/www/perl.html
http://imagemagick.sourceforge.net/http/?M=D
http://imagemagick.sourceforge.net/http/perl/?M=D
Image::Magick Samples
http://files.beerta.de/projects/mkgallery.pl
Get current image size
$srcim = Image::Magick->new;
( $width, $height, $srcsize, $format ) = $srcim->Ping($image);
Create Thumbnail
$srcim = Image::Magick->new;
$thumb = dirname($image) . "/thumb/" . basename($image) . ".jpg";
$err = $srcim->Read($image);
warn "$err" if "$err";
$srcim->Scale( geometry => '120x90' );
$err = $srcim->Write("$thumb");
warn "Warning: $err while processing $image" if "$err";
Image Resizing
Binary Usage for System Call
montage -geometry {width} {infile} {outfile}
You just need to install two RPM's for using this tool:
On RedHat 7.3 just download these RPM's and then type
rpm -Uhv ImageMagick-5.5.7-10.i386.rpm ImageMagick-devel-5.5.7-10.i386.rpm
|