rivresize


rivresize infile outfile factor


Description

rivresize magnifies the RivaFile infile by bilinearly interpolating factor-1 points between pixels in infile. The result is a RivaFile with image that is factor times larger than the infile image in both directions. The resized data is written to outfile. NS, NL, and PIXMETERS fields of outfile's header are calculated by rivresize. All other fields are copied from infile's RivaFile header. factor must be an integer greater than 1.

rivresize can resize DEMs if BPP=1 or BPP=2, and other images for any value of BPP. If infile is a DEM with BPP=2, the pixels in outfile will invariably be in Unix order (SUNFORMAT=1).

Usage

The following listing shows how to magnify 'dem.riv' by a factor of 2 in both dimensions:
% rivheader dem.riv RivaFile: dem.riv LBLSIZE=1024 TYPE='DEM' NL=171 NS=98 BPP=2 SUNFORMAT=1 PROJECTION='CYLINDRICAL' LONG0=-117.917 LAT0=38.4167 LONG1=-114.667 LAT1=33.6667 PIXMETERS=30.9 ZMETERS=1 ZDELTA=100 % rivresize dem.riv demnew.riv 2 rivresize: resizing RivaFile dem.riv rivresize: resize by a factor of 2 rivresize: creating RivaFile demnew.riv Resizing a DEM. rivresize: new size is 196 x 342 % rivheader dem.riv RivaFile: demnew.riv LBLSIZE=1024 TYPE='DEM' NL=342 NS=196 BPP=2 SUNFORMAT=1 PROJECTION='CYLINDRICAL' LONG0=-117.917 LAT0=38.4167 LONG1=-114.667 LAT1=33.6667 PIXMETERS=15.4 ZMETERS=1 ZDELTA=100 %

See Also

RivaFile Format, rivheader, rivshrink.

Privacy / Copyrights
FIRST GOV   NASA Home Page This page, http://pat.jpl.nasa.gov/RIVA//public/RIVA/rivresize.html, is maintained by Peggy Li and was last modified Friday, 15-Aug-2003 11:54:23 PDT, CL 03-2169
spacer