How can I spread / change an image (of any format) using a Perl script?
I recommend the image :: Imlib2 ... if you can install imlib2 on your machine
View the documentation:
Use the image: Imlib 2; # $ Image = Image :: Imlib2- & gt; Load the file from the load ("in.png"); # Get some information if you want my $ width = $ image- & gt; Width; My $ height = $ image- & gt; Height; Scale # image to $ x and $ y # You can set $ x or $ y to zero and this aspect ratio is $ $ image2 = $ image- & gt; Create_scaled_image ($ x, $ y); # $ Image2- & gt; Save the thumbnail to the file ("out.png");
You can also be interested, if you can not install Impleb 2, then
Comments
Post a Comment