pro loadb,file,x,y,header,rot,array ;--------------------------------------------------------------------- ; create a byte 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 ; ;----------------------------------------------------------------------- ; openr,unit,file,/GET_LUN ; temp = assoc(unit,bytarr(x,y),header) tmp = temp(0) array = rotate(tmp,rot) ; FREE_LUN,unit ; end