close,1 filenm=' ' mywin=0 img=0 img=bytarr(512,512) fpos=0 fpos=lonarr(1000) & ftmp=long(0) & ii=0 _a=0 & _b=0 & _c=0 _a=bytarr(256) & _b=bytarr(256) & _c=bytarr(256) ; Open a window device,window_state=winst if(winst(mywin) eq 0)then window,mywin,xsize=512,ysize=512 if( n_elements(dlistfile) eq 0) then begin ;{ dlistfile=' ' print,$ 'Enter in a filename that contains a list of the images you wish to view.' print,'The list should include the entire path to the images.' read,dlistfile endif $ else begin ;}{ print,' ' print,'Your present listfile is: ',dlistfile print,'If you want to change it, enter the idl command: dlistfile=''newone''' print,'Where ''newone'' is an example new list file.' print,' ' endelse;} print,' ' print,'The images listed in file: ',dlistfile,' will now be displayed.' print,' ' print,'You can use the mouse to move backwards and forwards in your image list.' print,'Place the mouse in the image window, and then:' print,' To move forwards, use the left most mouse button.' print,' To move backwards, use the middle mouse button.' print,' ' print,' ' close,13 & openr,13,dlistfile while ( not eof(13) ) do begin ;{ point_lun,-13,ftmp & fpos(ii)=ftmp readf,13,filenm read_gif,filenm,img,_a,_b,_c tvlct,_a,_b,_c wset,mywin & tv,img print,'Image presently displayed is: ',filenm ; Logic to move forwards or backwards in the list of images. cursor,x,y,/NORMAL if ( !ERR eq 2 ) then begin ;{ ii=ii-1 & if (ii le 0) then ii=0 point_lun,13,fpos(ii) endif else begin ;}{ ii=ii+1 endelse ;} endwhile ;} close,13 end