Resize and image!
Posted: 2018-06-04T06:11:18-07:00
Hi everyone!!
I am trying to resize (in a perl script) an image that has these dimensions 4272x2848 to other one that has 1280x720. Of course, while the aspect ratios are different, the image has to be 1) cuted above/right and below/left or 2) expanded.
Well, I cant find the solution to get the first option. Using the code below I reach an image expanded but I do not want that.
------>$iamge->Resize(geometry=>'1280x720!');
or
------>$iamge->Resize(width=>$width, height=>$height);
I try every thing, Scale, Extent, Resize, Gravity... But I do not get it.
I am trying to resize (in a perl script) an image that has these dimensions 4272x2848 to other one that has 1280x720. Of course, while the aspect ratios are different, the image has to be 1) cuted above/right and below/left or 2) expanded.
Well, I cant find the solution to get the first option. Using the code below I reach an image expanded but I do not want that.
------>$iamge->Resize(geometry=>'1280x720!');
or
------>$iamge->Resize(width=>$width, height=>$height);
I try every thing, Scale, Extent, Resize, Gravity... But I do not get it.