annotate perl/convert_images.pl @ 11:ed6ee381b8fd judyates

[svn r12] compressed photos and assembled them into a working web gallery
author rlm
date Mon, 12 Apr 2010 02:31:43 -0400
parents 60668cf4f443
children 34fdec47b0a0
rev   line source
rlm@11 1 #!/usr/bin/perl
rlm@11 2
rlm@11 3
rlm@11 4 chdir "/home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos-source/photos-normal";
rlm@11 5
rlm@11 6 @names = glob("*.JPG");
rlm@11 7
rlm@11 8 $" = "\n";
rlm@11 9
rlm@11 10 #print "@names";
rlm@11 11
rlm@11 12
rlm@11 13 for (@names){
rlm@11 14 /(.*)\.JPG/i;
rlm@11 15 $name = $1;
rlm@11 16
rlm@11 17 $command = "convert $_ -resize X584 -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/$name.jpg\n";
rlm@11 18 print $command;
rlm@11 19 `$command`;
rlm@11 20
rlm@11 21 $command = "convert $_ -resize 1300X -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/large/$name.jpg\n";
rlm@11 22 print $command;
rlm@11 23 `$command`;
rlm@11 24
rlm@11 25 $command = "convert ../photos-thumb/$_ -resize 120X120 -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/thumbs/$name.jpg\n";
rlm@11 26 print $command;
rlm@11 27 `$command`;
rlm@11 28
rlm@11 29
rlm@11 30
rlm@11 31 }