subr tvbrowsansft, x, win, cflag
 ;used for simple displays without an ft, just passes data to tv
 ;cflag controls compression by 2 or central area display
 nx = dimen(x, 0)		ny = dimen(x,1)
 ;since we want to match the window to the image, we need to check for
 ;one of the transpose cases of !iorder
 nxx = nx  nyy = ny
 if (!iorder % 2) eq 1 then { nxx = ny   nyy = nx }
 if cflag eq 1 or cflag eq 2 then  {
	xport,win,nxx/2,nyy/2,10,10 } else { xport,win,nxx,nyy,10,10 }
 if cflag eq 0 then tv, x,0,0,win else
   if cflag eq 1 tv,compress(x,2),0,0,win else
    if cflag eq 2 then tv,center(x,nx/2,ny/2),0,0,win
 xraise, win
 xflush
 endsubr
 ;=============================================================================
