Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: graphicsmagick perl shrink image to size

by tangent (Parson)
on Nov 01, 2021 at 17:00 UTC ( [id://11138304]=note: print w/replies, xml ) Need Help??


in reply to graphicsmagick perl shrink image to size

I gave up using Image Magick in favour of Imager. If you have a look at the scale() function on the Imager::Transformations page you will see how easy it is to accomplish.
my $newimg = $img->scale( xpixels => 800, ypixels => 200, type => 'min', );
Obviously you only need to do this transform if the original image exceeds one of the dimensions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138304]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found