On Tue, 27 Jul 2004 10:27 am, Aleksandar Donev wrote:
> A simple unformatted IO question (I am sure the answer must be simple).
> How do I read a file of unformatted integers one by one, in a do loop?
> That is, this is a grayscale image where the pixel values (0-256,
> unsigned char's in C) are stored in one file without any spaces or
> newlines or such.
Probably not what you want because this bypasses the problem and uses lots of
disk space: you could convert the image file to an ascii format like plain
ppm using some external program (maybe Imagemagick), then process it. That's
quick and easy to implement.
Regards,
Daniel.
------------------------------------------------------------------------
Dr. Daniel Grimwood Department of Chemistry
Email : [log in to unmask] The University of Western Australia
Phone : +61 8 64888563 35 Stirling Highway
Fax : +61 8 64881005 Crawley WA 6009
|