Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner...How do you call an image to screen in C++

Status
Not open for further replies.

LittleD

Programmer
Jul 9, 2000
1
CA
Im a young beginner programmer, c++ was my first language. Ive partly read a couple books yet so far i dont know how to get an image (jpeg or gif) to the screen. I guess i need to know that first before making games!

 
Ok here is the 40,000 foot view. After you take some time to investigate and try some of them then you can have more specific questions

*First you must know the format of the file .jpg, .gif etc., so you can read the file from disk into memory and access it's various components.

*Next you must know how to create a Device Independent Bitmap (DIB) of the contents of the image file.

*Next you use the assortment of GDI API's <BitBlt()> or DirectX API's to transfer the bits of the DIB onto the device in the manner that suits you. This of course includes various transformation techniques using masks etc.

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top