macro 'Import All BIORAD MRC filesÉ[I]'; { This macro illustrates how to import all foreign image files found in folder, using the BIORAD MRC image file format as an example. Note that the macro as it currently is written does not deal with multi-image files (I'll leave that one to interested programmers). The strategy is straitforeward, use "SetImport" to "Open All", and import the appropriate header information into indiviudal windows. Then loop through the windows on the screen extracting the appropriate header information, closing the window, and then reopening each file using this information. Note that to work properly you can't have any images open when you issue the command. Questions or comments can be sent to me at shelden@umich.edu Regards. Eric. } var nimages,count,width,height,offset:integer; fName:string; begin width:=512; height:=1; offset:=0; SetImport('8-bit,Open All'); SetCustom(width,height,offset); Import(''); {Read in header as an image, prompting for a file name.} nimages := nPics; SetImport('8-bit'); offset:=76; for count := 1 to nimages do begin SelectPic(1); fName := WindowTitle; width:=GetPixel(0,0)+GetPixel(1,0)*256; height:=GetPixel(2,0)+GetPixel(3,0)*256; Dispose; SetImport('8-bit'); SetCustom(width,height,offset); Import(fName); end; end;