On 2006-02-13, Niks <nb*****@gmail.com> wrote:
i wanted to know if there is any way to save and open BMP images
through C.I wanteed to interact with some images through C.
You most certainly can manipulate any file you want with C. The language
provides facilities for opening, reading and wrtiting files. Try reading
about fopen, fread, fwrite and similar functions of the standard C
library, or fgets, fputs, fprintf, etc for text-based I/O.
Of course C works with simple byte streams, not knowing anything, nor
imposing any specific structure on files, so you will have to either
implement the parsing of the bmp format yourself (by using the file i/o
functions provided by C), or find some code that does this job for you,
and use it.
In an off-topic comment, if you just want to interface with other image
manipulation/loading programs and you don't necessarily need the "bmp"
format but any one will do, try reading about "ppm" or "portable pixmap"
which is an extremely simple format to read and write.
--
John Tsiombikas (Nuclear / Mindlapse)
nu*****@siggraph.org http://nuclear.demoscene.gr/