ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pgblur.csh
Revision: 1.3
Committed: Wed Jun 21 15:43:16 2023 UTC (10 months, 2 weeks ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 1.2: +3 -3 lines
Log Message:
fix: made handling of resolution strings more consistent

File Contents

# User Rev Content
1 greg 1.1 #!/bin/csh -f
2 greg 1.3 # RCSid $Id: pgblur.csh,v 1.2 2008/11/10 19:08:19 greg Exp $
3 greg 1.1 #
4     # Apply Gaussian blur without resizing image
5     # More efficient than straight pfilt for large blurs
6     #
7     if ( $#argv != 3 ) then
8     goto userr
9     endif
10     if ( "$1" != "-r" ) then
11     goto userr
12     endif
13     if ( "$2" !~ [1-9]* ) then
14     goto userr
15     endif
16     set rad = $2
17     set inp = "$3"
18     set reduc = `ev "floor($rad/1.8)"`
19     if ( $reduc <= 1 ) then
20     exec pfilt -1 -r $rad $inp:q
21     endif
22     set filt = `ev "$rad/$reduc"`
23 greg 1.3 set pr=`getinfo -d < $inp:q`
24 greg 1.1 pfilt -1 -x /$reduc -y /$reduc $inp:q \
25 greg 1.3 | pfilt -1 -r $filt -x $pr[4] -y $pr[2]
26 greg 1.1 exit 0
27     userr:
28 greg 1.2 echo Usage: "$0 -r radius input.hdr"
29 greg 1.1 exit 1