W
William Cleveland
A portable bitmap file (.pbm, usually) is a few header lines, followed
by a raw, two-dimensional array of bytes. Using system IO, you can
just write() your array of bytes with a single call, after you write
the header lines (probably with a sprintf call or the IO Streams
equivilant, followed by a single write() call for that buffer).
If you're talking about the Windows .bmp format, it's not really a
bitmap. It's complicated enough that you'll probably want to find
a library.
Bill
by a raw, two-dimensional array of bytes. Using system IO, you can
just write() your array of bytes with a single call, after you write
the header lines (probably with a sprintf call or the IO Streams
equivilant, followed by a single write() call for that buffer).
If you're talking about the Windows .bmp format, it's not really a
bitmap. It's complicated enough that you'll probably want to find
a library.
Bill