PRO wrkimg,name,headbytes,image ; ; This procedure accepts a file name, an image header in KI format ; (v1.0), and an image, byte-reverses the data, opens the file, ; writes the header and image as binary data, and closes the file. ; headbytescopy=headbytes imagecopy=image ; avoid messing up passed image BYTEORDER,headbytescopy ; reverse byte order of header bytes BYTEORDER,imagecopy ; and image bytes OPENW,unit,name,/GET_LUN WRITEU,unit,headbytescopy,imagecopy CLOSE,unit & FREE_LUN,unit RETURN END