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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bitmap into some buffer

Status
Not open for further replies.

jdeejay

Programmer
Oct 5, 2001
44
US
Would someone please point me in the right direction? I am trying to use svgalib which has a function gl_putbox which I believe will allow me to put a bitmap image to some place on the screen. It takes a buffer as one of the arguments. My question is how to fill the buffer with bitmap data. Any info is welcome as am new to C and this library.

Thanks
 
Hi JDJ,

Bitmap image is not compressed and stores the screen info in bit by bit pattern. Therefore its just a flat file which you can read char by char and fillup an array. Use binary mode to read the file and fill up the array bit by bit. The size of the file would depend on the dimension. A full screen image in resolution 800x600 would be 480,000 bytes in size.

That's with the file. to be honest, I don't know the method you are talking about. Try what I have just said and if it dosen't work, try using a buffer pointer to the screen 0xA000000l; and plot the colors linearly in it. It will display the image...

Have fun coding...;-)

Roy.
user.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top