Viewing contents of file '../idllib/uit/pro/border.pro'
pro border, imagein,imageout
;+
; NAME:
;       BORDER
; PURPOSE:
;       To blacken out a border around an image. (50 pixels wide)
; CALLING SEQUENCE:
;       border, imagein, imageout
; INPUTS:
;       imagein    - input image array
; OUTPUTS:
;       imageout - output image array
; REVISON HISTORY:
;       written by B. Pfarr, STX,12/14/90
;-
 common tv,chan,zoom,xroam,yroam

;			Check for required param

 if N_params() lt 2 then begin
   print,'Syntax  - border, imagein, imageout'
   return
 endif

;			Initialize.

 NPIX = 50
 NPIX1 = NPIX+1
 s = size(imagein)
 xsz=s(1)
 ysz=s(2)

;			Compute corners and limits

 xlim = xsz - npix
 ylim = ysz - npix
 x0 = npix
 y0 = npix
 x1 = xlim - 1
 y1 = ylim - 1

;			Blacken out area outside graph

 imageout = imagein
 message,'Erasing image edges',/INF
 imageout(0:xsz-1,0:npix-1) = 0
 imageout(0:xsz-1,ylim:npix+ylim-1) = 0
 imageout(0:npix-1,npix-1:ylim) = 0
 imageout(xlim:npix+xlim-1,npix-1:ylim) = 0

 return
 end