"Raw binary files" usually indicates files made of data stored as bytes which may have any kind of interpretation the file-writer sees fit. You then mention "columns and rows of 1s and 0s", which I usually interpret as monchromatic image data - i.e an image with exactly two colors, usually pure black and pure white. Probably, I don't need to know which interpretation is correct to answer your main question here, however.
You say you have '.tif' files with 320 columns by 241 rows, the 241st being the header. I have never looked at the specification for the TIFF file format, but I would not think that that specification stores "header information" in a row. Standardized image file formats, like TIFF, GIF, JPEG, etc., generally store most, if not all, of their metadata/header information in the first bytes of the file; the actual data payload usually follows the header. So, I am naturally confused by your description.
Perhaps it is no matter, though. What do the commands:
IDL> print, query_tiff('my_image.tif', info)
IDL> help, info, /STRUCT
say about your file. If the first call returns 1, then you should be able to run:
IDL> ; To import the image array into IDL
IDL> imgData = read_tiff('my_image.tif', ORIENTATION=orientation, /VERBOSE
IDL> ; The below assumes that 'orientation' equals 0 and you are happy with that as is.
IDL> openw, lun, 'my_raw_binary_image.dat', /GET_LUN
IDL> writeu, lun, imgData
IDL> free_lun, lun
'my_raw_binary_image.dat' should then contain 320 * 240 bytes (or shorts or longs, depending on the datatype of imgData), with the first 320 bytes/shorts/longs representing the data in the very bottom scan line of the image, the next 320 representing the second-from-bottom scan line, etc.
James Jones
|