Archived

This topic is now archived and is closed to further replies.

Frankie68

loading and writing BMP's

Recommended Posts

Frankie68    122
Hello, Just an easy question: How do I have to read, and write, info from, and to, a .bmp-file? Should I make use of the BITMAPINFOHEADER-struct? Or is there a beter way? I want to make screenshots and so on. BTW: I use VC++6.0 I hope one of you can help me...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
You can find loads of info on BMP reading and writing here

http://www.codeguru.com/bitmap/index.shtml

Share this post


Link to post
Share on other sites
zipless    122
Yep your on the right track, use a BITMAPINFOHEADER and BITMAPFILEHEADER structures and you''ll also need an area of allocated memory to store the actual image in.

If your dealing with bmp''s with palettes you''ll need an array of PALETTEENTRY''s to stroe that info in as well.

Check the MSDN, it''s got a fair bit of info on the subject.

zipless

/* Ignorance is bliss, then you go and spoil it by learning stuff */

Share this post


Link to post
Share on other sites