Hi,
How to stretch or resize an image (Of any Format) using a Perl script?
Could any one suggest please.
Tnx in advance.
Hi,
How to stretch or resize an image (Of any Format) using a Perl script?
Could any one suggest please.
Tnx in advance.
I'd recommend Image::Imlib2... if you can install imlib2 on your machine
See documentation: Image::Imlib2
use Image::Imlib2;
my $image = Image::Imlib2->load("in.png");
my $width = $image->width;
my $height = $image->height;
my $image2 = $image->create_scaled_image($x,$y); # Scale to 100x100 pixels
# you can leave out the X or Y and it will maintain aspect ratio
$image2->save("out.png");
You might also be interested in Image::Imlib2::Thumbnail, if you can not install imlib2 have a look at Image::Magick