Re: How to write a Bitmap file

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top