pro loadftst,file,x,y,header,rot,array ;--------------------------------------------------------------------- ; create a floating point array from a file ; ; where: file = file name (in quotes) ; x = x dimension of the array ; y = y dimension of the array ; header = number of bytes to skip into the file before ; reading an image ; rot = number to rotate or flip image: ; 0 = 0 degrees (counter-clockwise) ; 1 = rotate 90 degrees ; 2 = rotate 180 degrees ; 3 = rotate 270 degrees ; 4 = flip image right-left and ; rotate 270 degrees ; 5 = flip image right-left ; 6 = flip image right-left and ; rotate 90 degrees ; 7 = flip image top-bottom ; array = output name for the array ; ;----------------------------------------------------------------------- ; CD,'\IDL\PAIM' openr,unit,file,/GET_LUN ; temp = assoc(unit,fltarr(x,y),header) tmp = temp(0) array = rotate(tmp,rot) IF STRMID(STRUPCASE(!VERSION.OS),0,3) EQ 'WIN' THEN BEGIN BYTEORDER,array,/LSWAP hlp,array ENDIF ; FREE_LUN,unit ; end