newb needs help bmp

M

Mitch

Built a basic word game for the kids,
using if, else , string input, etc, its kinda cool
I would like to put in some bmp or jpg to color it up a bit.
The books i have do not show how to display a picture,
Please let me know how to simply put in picture files into my program
TIA
 
T

Tim Love

Mitch said:
The books i have do not show how to display a picture,
Maybe because our books are too stupid to know what operating system
and compiler you're using.
 
H

Howard

Tim Love said:
Maybe because our books are too stupid to know what operating system
and compiler you're using.

Stupid books! :)

Seriously...you (Mitch) need to ask this in a newsgroup devoted to the
operating system and/or compiler that you're using. Bitmaps are not part of
standard C++ (which is what is discussed here), but are instead
implementations by third parties or by compiler vendors for specific
platforms (operating systems), such as Visual C++ under the Windows
operating system.

-H
 
M

Micah Cowan

Mitch said:
Built a basic word game for the kids,
using if, else , string input, etc, its kinda cool
I would like to put in some bmp or jpg to color it up a bit.
The books i have do not show how to display a picture,
Please let me know how to simply put in picture files into my program
TIA

Displaying graphics of any kind is going to be extremely
dependent on what platform you are using, and would be extremely
off-topic here. Post this question to a newsgroup related to the
platform you are writing on.

A portable interface such as that provided by SDL can help make
this easy; SDL also includes facilities for loading and
displaying BMP graphics; SDLimage also supports JPG and others.

However, you should know that it is unlikely that you can simply
mix in some calls to your existing code, if you are currently
using standard streams (such as cout) to handle your
input/output: these streams are unlikely to result in things
being displayed in the same place as the graphics: you'll need to
use an entirely different mechanism, possibly drawing the text
directly to the graphics display.

HTH.
 
M

Mitch

Micah Cowan said:
Displaying graphics of any kind is going to be extremely
dependent on what platform you are using, and would be extremely
off-topic here. Post this question to a newsgroup related to the
platform you are writing on.

A portable interface such as that provided by SDL can help make
this easy; SDL also includes facilities for loading and
displaying BMP graphics; SDLimage also supports JPG and others.

However, you should know that it is unlikely that you can simply
mix in some calls to your existing code, if you are currently
using standard streams (such as cout) to handle your
input/output: these streams are unlikely to result in things
being displayed in the same place as the graphics: you'll need to
use an entirely different mechanism, possibly drawing the text
directly to the graphics display.

HTH.

Thank you for the info
 

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

Forum statistics

Threads
474,197
Messages
2,571,040
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top