By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,406 Members | 905 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,406 IT Pros & Developers. It's quick & easy.

use of bit map file in C++

P: 3
I want to open a bit map file in C++ and display the picture on the monitor through my c++ program
Nov 7 '06 #1
Share this Question
Share on Google+
3 Replies


100+
P: 111
www.brackeen.com/home/vga/bitmaps.html

visit this site. But it is only in "C". U only have to convert it to C++
Nov 8 '06 #2

100+
P: 111
Hai susheelam

Visit www.rkbabu.cjb.net
Nov 15 '06 #3

100+
P: 145
Hai susheelam

Visit www.rkbabu.cjb.net
Do you have another method that can take advantage of modern 32-bit and 64-bit hardware? :) I just don't see the future in using DOS-mode 16-bit VGA graphics compiled on an old compiler. It's not likely to be compatible with other compilers, and this DOS-mode stuff may not even be compatible with future operating systems. I have my doubts that Vista will allow those old interrupts to work anymore, for instance ...

@susheelam:
If you care to look, here is a C++ bitmap library that can run on many compilers and operating systems, and isn't limited to 1, 8, 16, and 24 bit images. (There are also 4-bit and 32-bit images). This library can be used for reading, modifying, and writing bitmap images.

If you're looking for a very complete writeup of the BMP format, I'd recommend looking here. This reference was very helpful for me when I wrote my BMP library.

As for viewing the image, the most future-oriented way (i.e., developing and using skills that will be marketable in the present and future) is to use a windowing system, such as win32, wxWindows, QT, OpenGL with GLUT (this option would be overkill), or GTK. The idea would be to:

1) Load the image (e.g., via EasyBMP)
2) Create a window
3) Paint the image to the window

Somebody here on the forums (I can't remember exactly who) recently posted a link to a nice site that has some good win32 tutorials. I believe that the tutorials claim to be oriented towarc VC++, but anything that just uses standard c++ and the win32 API (no MFC) should compile just fine in g++ / mingw, for instance.

I hope some of this additional information is helpful for you. Thanks -- Paul
Nov 15 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.