diff 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
line wrap: on
line diff
     1.1 --- a/perl/convert_images.pl	Mon Apr 12 01:57:22 2010 -0400
     1.2 +++ b/perl/convert_images.pl	Mon Apr 12 02:31:43 2010 -0400
     1.3 @@ -1,7 +1,31 @@
     1.4 -@names = glob("*.tif");
     1.5 -
     1.6 -for (@names){
     1.7 -/(.*)\.tif/;
     1.8 -$name = $1;
     1.9 -`convert $_ -resize 200X1000 -quality 85\% $name(small).jpg`;
    1.10 -}
    1.11 \ No newline at end of file
    1.12 +#!/usr/bin/perl
    1.13 +
    1.14 +
    1.15 +chdir "/home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos-source/photos-normal";
    1.16 +
    1.17 +@names = glob("*.JPG");
    1.18 +
    1.19 +$" = "\n";
    1.20 +
    1.21 +#print "@names";
    1.22 +
    1.23 +
    1.24 +for (@names){
    1.25 + /(.*)\.JPG/i;
    1.26 + $name = $1;
    1.27 + 
    1.28 + $command = "convert $_ -resize X584 -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/$name.jpg\n";
    1.29 + print $command;
    1.30 + `$command`;
    1.31 + 
    1.32 + $command = "convert $_ -resize 1300X -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/large/$name.jpg\n";
    1.33 + print $command;
    1.34 +  `$command`;
    1.35 + 
    1.36 + $command = "convert ../photos-thumb/$_ -resize 120X120 -quality 85\% /home/r/Desktop/web/judyates/e2gallerypro/e2upload/Galleries/photos/thumbs/$name.jpg\n";
    1.37 + print $command;
    1.38 + `$command`;
    1.39 +  
    1.40 + 
    1.41 + 
    1.42 +}