Parent Directory | Revision Log
added bunch of models and script to resize tif pictures
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | sub resize { |
7 | my $tif = shift; |
8 | my $basename = $tif; |
9 | $basename =~ s|^.*?([^/]+)$|$1|; |
10 | my $to = "share/web/static/pics/$basename.jpg"; |
11 | return if -e $to; |
12 | my $cmd = "convert -geometry 320x200 '$tif.tif' $to"; |
13 | warn "## $cmd\n"; |
14 | system( $cmd ); |
15 | } |
16 | |
17 | foreach my $tif ( @ARGV ) { |
18 | if ( $tif =~ s/\.tiff*$// ) { |
19 | resize( $tif ); |
20 | } else { |
21 | warn "$tif not tif!\n"; |
22 | next; |
23 | } |
24 | } |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |