FUNCTION imin,name,size OPENR,unit,name,/GET_LUN wsize=wlen(unit,size) CASE wsize OF 1: image=BYTARR(size,size) 2: image=INTARR(size,size) 4: image=FLTARR(size,size) ENDCASE READU,unit,image CLOSE,unit FREE_LUN,unit IF wsize EQ 2 THEN BEGIN IF (MIN(image) LT 0) THEN BYTEORDER,image IF (MIN(image) LT 0) THEN PRINT,'imin : image values don''t look right' ENDIF RETURN,image END