Building TerraGear in Ubuntu 910 (32- or 64-bit): Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 96: Line 96:
                 #!/usr/bin/perl
                 #!/usr/bin/perl


                 die "Usage: $0 file xdiv ydiv res\n" if ( $#ARGV != 3 );
                 die "Usage: $0 file xdiv ydiv res\n" if $#ARGV != 3;
                      
                      
                 $file = shift @ARGV;
                 $file = shift;
                 $xdiv = shift @ARGV;
                 $xdiv = shift;
                 $ydiv = shift @ARGV;
                 $ydiv = shift;
                 $res = shift @ARGV;
                 $res = shift;


                 die "Must start with a .png file\n" if ( $file !~ m/\.png$/ );
                 die "Must start with a .png file\n" if $file !~ /\.png$/;


                 # extract image dimensions
                 # extract image dimensions
Line 110: Line 110:
                 $info =~ s/,//g;
                 $info =~ s/,//g;
                 ($junk, $type, $junk, $junk, $width, $junk, $height, $junk)
                 ($junk, $type, $junk, $junk, $width, $junk, $height, $junk)
                     = split(/\s+/, $info, 8);
                     = split(' ', $info, 8);
                 print "$width - $height\n";
                 print "$width - $height\n";


1

edit

Navigation menu