This Perl-Script resize all images to the size 166×125, I used to speed up my homepage:
#!/usr/bin/perl opendir(DIR, "./"); @files = grep { /\.jpg$|\.gif$/io } readdir(DIR); sleep(10); $count=0; for(@files){ print "".(($count*100)/$#files)."% ".$_." - "; $cach = 'convert "./'.$_.'" -print "%wx%h" /dev/null'; $size = `$cach`; $size =~ /^(.+)x(.+)$/o; print " - ".$1.":".$2; if(defined($1) && defined($2) && ($1 > 166 || $2 > 125)){ system('mogrify -resize 166x125 "./'.$_.'"'); } ++$count; print $/; } closedir(DIR);
Good topic. I must spend some time learning much more or figuring out more.
Thanks for great information I was searching for this
info for my mission.
Great web site you have here.. It’s difficult to find good quality writing like yours
nowadays. I truly appreciate individuals like you! Take care!!