;+ ; NAME: ; wrim ; PURPOSE: (one line) ; Write the contents of a window or device to a graphics file ; CATEGORY: ; Graphics ; CALLING SEQUENCE: ; wrim, filename ; INPUTS: ; filename : A string containing the name of file to be written. ; KEYWORD PARAMETERS: ; PROCEDURE ; At some point (2007 May 8) - write_tiff was not found, so this uses "obsolete" tiff_write ; MODIFICATION HISTORY: ; Written 2008 May 8, by Leslie Young, SwRI ; 2016 Mar 22 LAY. Added header documentation. ;- pro wrim, fn, im, norm = norm ; replaces write_png if strmatch(fn, '*.tif') or strmatch(fn, '*.tiff') then begin tiff_write, fn, im endif else begin tiff_write, fn+'.tif', im spawn, 'convert ' + fn+'.tif ' + fn if not keyword_set(norm) then begin spawn, 'rm ' + fn + '.tif' endif endelse end