in reply to How to resize picture in windows?

If you can get GD installed, then something like this will get you started:

#! perl -slw use strict; use GD; our $X ||= 100; our $Y ||= 100; for my $imgName ( @ARGV ) { my $img1 = GD::Image->new( $imgName ) or warn "$imgName: $!" and n +ext; my $img2 = GD::Image->new( $X, $Y, 1 ); $img2->copyResampled( $img1, 0,0, 0,0, $X,$Y, $img1->getBounds ); ( my $thumbName = $imgName ) =~ s[(\..+$)][.thumb.png]; open OUT, '>:raw', $thumbName or warn "$thumbName: $!" and next; print OUT $img2->png; close OUT; }

It resizes every image supplied on the command line to the same size (100x100 by default) and outputs them as filename.ext => filename.thumb.png.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.