ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rcode2bmp.pl
(Generate patch)

Comparing ray/src/util/rcode2bmp.pl (file contents):
Revision 2.2 by greg, Tue Jan 21 18:00:17 2020 UTC vs.
Revision 2.3 by greg, Tue Nov 15 23:47:50 2022 UTC

# Line 41 | Line 41 | while ($#ARGV >= 0) {
41          my ($dest) = ("$ARGV[0]" =~ /^([^.]+)/);
42          $dest .= ".bmp";
43          my $cmd="";
44 <        if ("$format" =~ /^32-bit_rle_(rgb|xyz)e$/) {
44 >        if ("$format" =~ /^32-bit_rle_(rgb|xyz)e *$/) {
45                  if ($pfilt) {
46                          $cmd = $pfilt . " '$ARGV[0]' | ra_bmp -e auto - '$dest'";
47                  } else {
48                          $cmd = "ra_bmp -e auto '$ARGV[0]' '$dest'";
49                  }
50 <        } elsif ("$format" eq "16-bit_encoded_depth") {
50 >        } elsif ("$format" =~ /^16-bit_encoded_depth *$/) {
51                  $cmd = "rcode_depth -r -ff -ho -Ho '$ARGV[0]' ";
52                  $cmd .= q{| rcalc -if -of -e 'cond=9e9-$1;$1=$1' | total -if -u};
53                  my $dmax=`$cmd`;
# Line 58 | Line 58 | while ($#ARGV >= 0) {
58                  $cmd = "rcode_depth -r -ff '$ARGV[0]' | pvalue -r -df -b ";
59                  $cmd .= "| $pfilt " if ($pfilt);
60                  $cmd .= "| falsecolor -l '$unit' -m 1 -s $dmax | ra_bmp - '$dest'";
61 <        } elsif ("$format" =~ /[1-9][0-9]*-bit_indexed_name$/) {
61 >        } elsif ("$format" =~ /^[1-9][0-9]*-bit_indexed_name *$/) {
62                  $cmd = "rcode_ident -r -n '$ARGV[0]' " .
63                          "| getinfo +d -c rcalc -e 'cc(x):(.1+.8*rand(x))^2' " .
64                          q{-e '$1=cc(.398*$1-11.2);$2=cc(-1.152*$1+41.7);$3=cc(8.571*$1-8.15)' } .
65                          "| pvalue -r -d ";
66                  $cmd .= "| $pfilt " if ($pfilt);
67                  $cmd .= "| ra_bmp - '$dest'";
68 <        } elsif ("$format" eq "32-bit_encoded_normal") {
68 >        } elsif ("$format" =~ /^32-bit_encoded_normal *$/) {
69                  $cmd = "rcode_norm -r -ff '$ARGV[0]' | getinfo +d -c " .
70                          "rcalc -if3 -of -e `vwright v < '$ARGV[0]'` " .
71                                  q{-e 'dot(vx,vy,vz)=vx*$1+vy*$2+vz*$3' } .

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines