On Tuesday 29 Dec 2009, Roshan wrote:
I have been trying to search on reading an image file via C. I haven't been able to find code without libraries. However, being aware of the 'binary' mode in Windows (Turbo C++), I had read it using fopen, fread and fseek to read the header and then the contents. However, this reading was done reading individual bytes and not reading it using structures.
Unix/Linux don't distinguish between binary and ASCII mode files. Use the same function calls as you do in Winduhs, just omit the "b" in the fopen.
Regards,
-- Raju