loading and writing BMP's

Started by
3 comments, last by Frankie68 22 years, 3 months ago
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...
Advertisement
You can find loads of info on BMP reading and writing here

http://www.codeguru.com/bitmap/index.shtml
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 */
/* Ignorance is bliss, then you go and spoil it by learning stuff */
Download GDI+ and you''ll be all set In with the new air out with the bad air.
I will try your idea''s.

Thank you, this will help me very much!!!

This topic is closed to new replies.

Advertisement