Re: Mixed ASCII/Binary Files [message #9436 is a reply to message #9301] |
Thu, 26 June 1997 00:00  |
DALY
Messages: 3 Registered: January 1997
|
Junior Member |
|
|
Hi Chaz Daly here,
I'm the originator of this thread. Thanks to all for the help...
Brian Jackel's fix worked best. Here are the specifics...
I created files using Labview 3.0.1. The files consist of
a 6 line ASCII header (the header values can be positive
or negative so the header length is variable) followed by
image data. The number of pixels being contained in the header.
I tried reading the header in in a variety of ways and then, using
FSTAT, tried to pick up reading the binary (image) data where the
header left off. Problem was that the pointer returned by FSTAT
would sometimes be way past the end of the header.
Brian told me to set my BUFSIZE = 0 on opening the file...it worked!
Again, thanks to everybody for the help...
Chaz Daly out
On Wed, 25 Jun 1997, DALY wrote:
> Hi,
>
> I'm running IDL 4.0.1 under Windows 95 and am having a heck of
> a time doing anything with mixed ASCII/binary files (header/data)
> files. I've tried all kinds of tricks to read the header and then
> the data, but IDL's file pointer keeps getting lost. Does anybody
> know of any fixes/patches? I know I can separate the header and
> data with another package and then read into IDL, but that kind of defeats
> the purpose of having a high-power package like IDL. Any
> comments/suggestions will be greatly appreciated.
>
> Thanks,
> Chaz Daly
>
>
>
|
|
|