Revision: 815
http://panotools.svn.sourceforge.net/panotools/?rev=815&view=rev
Author: brunopostle
Date: 2008-02-12 15:27:16 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
File::Spec::Functions isn't portable
Modified Paths:
--------------
trunk/Panotools-Script/bin/match-n-shift
trunk/Panotools-Script/bin/process-masks
Modified: trunk/Panotools-Script/bin/match-n-shift
===================================================================
--- trunk/Panotools-Script/bin/match-n-shift 2008-02-12 23:06:54 UTC (rev 814)
+++ trunk/Panotools-Script/bin/match-n-shift 2008-02-12 23:27:16 UTC (rev 815)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use File::Spec::Functions;
+use File::Spec;
use Getopt::Long;
use Pod::Usage;
use Image::Size;
@@ -53,14 +53,14 @@
for my $path_input (@paths_input)
{
# create a smaller version of the original photo
- my $path_input_small = catfile ($tempdir, "small_$index.tif");
+ my $path_input_small = File::Spec->catfile ($tempdir, "small_$index.tif");
# if no ImageMagick, then use full size image, slooooow
system ('convert', '-depth', 8, '-geometry', $pix_max.'x'.$pix_max,
$path_input, $path_input_small) && ($path_input_small = $path_input);
# create small stereographic version
my ($pix_width, $pix_height) = imgsize ($path_input_small);
- my $path_pto_temp = catfile ($tempdir, "$index.pto");
+ my $path_pto_temp = File::Spec->catfile ($tempdir, "$index.pto");
# don't use stereographic is projection isn't azimuthal
my $projection_panorama = 4;
@@ -75,7 +75,7 @@
f => $projection, Eev => 0, r => 0, p => 0, y => 0, n => "\"$path_input_small\"");
$pto->Write ($path_pto_temp);
- my $path_output_small = catfile ($tempdir, "sgraph_$index.tif");
+ my $path_output_small = File::Spec->catfile ($tempdir, "sgraph_$index.tif");
system ('nona', '-p', 'UINT8', '-o', $path_output_small, $path_pto_temp);
$index++;
Modified: trunk/Panotools-Script/bin/process-masks
===================================================================
--- trunk/Panotools-Script/bin/process-masks 2008-02-12 23:06:54 UTC (rev 814)
+++ trunk/Panotools-Script/bin/process-masks 2008-02-12 23:27:16 UTC (rev 815)
@@ -3,16 +3,16 @@
use strict;
use warnings;
use File::Temp qw/tempdir/;
-use File::Spec::Functions;
+use File::Spec;
use File::Copy;
die "Usage:\n $0 image1_mask.tif image2_mask.tif [image3_mask.tif ...]\n" unless @ARGV;
my $tempdir = tempdir (CLEANUP => 1);
-my $maskdir = catfile ($tempdir, 'mask');
-my $pushdir = catfile ($tempdir, 'push');
-my $workdir = catfile ($tempdir, 'work');
+my $maskdir = File::Spec->catfile ($tempdir, 'mask');
+my $pushdir = File::Spec->catfile ($tempdir, 'push');
+my $workdir = File::Spec->catfile ($tempdir, 'work');
mkdir $maskdir;
mkdir $pushdir;
@@ -21,9 +21,9 @@
for my $path (@ARGV)
{
my ($vol, $dir, $file) = File::Spec->splitpath ($path);
- my $maskdir_file = catfile ($maskdir, $file);
- my $pushdir_file = catfile ($pushdir, $file);
- my $workdir_file = catfile ($workdir, $file);
+ my $maskdir_file = File::Spec->catfile ($maskdir, $file);
+ my $pushdir_file = File::Spec->catfile ($pushdir, $file);
+ my $workdir_file = File::Spec->catfile ($workdir, $file);
system ('convert', '-threshold', '99%', $path, $maskdir_file);
system ('convert', '-negate', $maskdir_file, $pushdir_file);
copy ($path, $workdir_file);
@@ -32,15 +32,15 @@
for my $path (@ARGV)
{
my ($vol, $dir, $file) = File::Spec->splitpath ($path);
- my $tempdir_file = catfile ($tempdir, $file);
- my $workdir_file = catfile ($workdir, $file);
+ my $tempdir_file = File::Spec->catfile ($tempdir, $file);
+ my $workdir_file = File::Spec->catfile ($workdir, $file);
for my $temp (@ARGV)
{
next if ($temp eq $path);
my ($vol, $dir, $temp) = File::Spec->splitpath ($temp);
- my $pushdir_temp = catfile ($pushdir, $temp);
- my $maskdir_temp = catfile ($maskdir, $temp);
+ my $pushdir_temp = File::Spec->catfile ($pushdir, $temp);
+ my $maskdir_temp = File::Spec->catfile ($maskdir, $temp);
system ('composite', $pushdir_temp, $workdir_file, $maskdir_temp, $tempdir_file);
move ($tempdir_file, $workdir_file);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|