annotate perl/convert_images.pl @ 28:118cb614cf18 judyates tip

judy bio.
author Robert McIntyre <rlm@mit.edu>
date Tue, 29 Dec 2015 16:26:18 -0800
parents 34fdec47b0a0
children
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@14 17 $command = "convert $_ -resize 720X480 -quality 90\% /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@14 21 $command = "convert $_ -resize 1300X -quality 90\% /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@14 25 $command = "convert ../photos-thumb/$_ -resize 120X120 -quality 90\% /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 }