c 96,12
	subroutine pgximage(map,n1,n2,black,white)
	integer*2 map(n1,n2)
	character dummy
	real rbuf(600)
	n16=84
	d=n16/(black-white)
	jj=(641-n2)*.5
	rbuf(1)=(641-n1)*.5-5
	do 40 j=1,n2
	rbuf(2)=j+jj
	i6=2
	do 30 i=1,n1
	k=nint(d*(map(i,j)-white))
	if(k.lt.1)k=1
	if(k.gt.n16)k=n16
	i6=i6+1
30	rbuf(i6)=k+15
40	call xwdriv(26,rbuf,i6,dummy)
	call pgebuf
	end	

	subroutine pgximage0(map,n1,n2,black,white)
	integer*2 map(n1,n2)
	character dummy
	real rbuf(600)
	n16=84
	d=n16/(black-white)
	jj=-20
	rbuf(1)=-20
	do 40 j=1,n2
	rbuf(2)=j+jj
	i6=2
	do 30 i=1,n1
	k=nint(d*(map(i,j)-white))
	if(k.lt.1)k=1
	if(k.gt.n16)k=n16
	i6=i6+1
30	rbuf(i6)=k+15
40	call xwdriv(26,rbuf,i6,dummy)
	call pgebuf
	end	

	subroutine pgximage2(map,n,ix,iy,black,white)
	integer*2 map(n,n)
	character dummy
	real rbuf(600)
	n16=84
	d=n16/(black-white)
	jj=iy-20
	rbuf(1)=ix-20
	do 40 j=1,n
	rbuf(2)=jj+j
	i6=2
	do 30 i=1,n
	k=nint(d*(map(i,j)-white))
	if(k.lt.1)k=1
	if(k.gt.n16)k=n16
	i6=i6+1
30	rbuf(i6)=k+15
40	call xwdriv(26,rbuf,i6,dummy)
	call pgebuf
	end	
