/[Arh]/bin/resize-tif.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /bin/resize-tif.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations)
Thu Nov 29 11:20:24 2007 UTC (12 years, 10 months ago) by dpavlin
File MIME type: text/plain
File size: 419 byte(s)
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 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26