include include procedure qdgtim( imfnstr, im, imfn, imsect, imall, impixtype, imnx, imny, imdx, imdy, imptr, status) char imfnstr[ARB] # parameter name pointer im # descriptor pointer imfn # filename string pointer pointer imsect # section bool imall # entire image? int impixtype # pixel type int imnx # number of columns int imny # number of rows int imdx # column offset int imdy # row offset pointer imptr # pixel pointer int status int iy pointer immap() pointer imgl2r() begin status = 0 call clgstr (imfnstr, Memc[imfn], SZ_LINE) call imgsection (Memc[imfn], Memc[imsect], SZ_FNAME) imall = (Memc[imsect] == EOS) im = immap (Memc[imfn], READ_ONLY, 0) impixtype = IM_PIXTYPE(im) imnx = IM_LEN(im,1) imny = IM_LEN(im,2) imdx = IM_VOFF(im,1) imdy = IM_VOFF(im,2) call malloc (imptr, imnx*imny, TY_REAL) # allocate memory do iy = 1,imny { # copy section data row by row call amovr( Memr[imgl2r(im,iy)], Memr[imptr+((iy-1)*imnx)], imnx ) } end #