Reading in a bitmap and getting RGB values

S

steve

I am trying to use ANSI C to read in a bitmap and for each x,y value
get a value for the R, G, and B channels. What would be the best way
to go about this? I had some code working but it would not work for
images larger than 640x480 it would just crash. I have tried using the
Microsoft bmp.c/bmp.h code as well as something called ImageFmtc.c/
ImageFmtc.h and either receive unexpected results or program crashes
on large images.

Thanks for the advise/help on the topic!
 
A

adam majewski

steve pisze:
I am trying to use ANSI C to read in a bitmap and for each x,y value
get a value for the R, G, and B channels. What would be the best way
to go about this? I had some code working but it would not work for
images larger than 640x480 it would just crash. I have tried using the
Microsoft bmp.c/bmp.h code as well as something called ImageFmtc.c/
ImageFmtc.h and either receive unexpected results or program crashes
on large images.

Thanks for the advise/help on the topic!

http://local.wasp.uwa.edu.au/~pbourke/dataformats/bmp/

http://entropymine.com/jason/bmpsuite/
http://fraktal.republika.pl/g_file.html

What do you think about PPM file ?

HTH

Adam
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top