win32lib / bitmap from memory question

new topic     » topic index » view thread      » older message » newer message

Hello everyone,

I created a simple datafile format that reads in bitmap images from 
files.  Each bitmap file is completely contained within the datafile in 
a simple index like fashion without distorting the original file 
structure.  I would like to be able to draw the images from the datafile 
without extracting them and placing them in a temporary file, or, even 
better to draw straight from memory.  Is there a simple way to read a 
bitmap from a allocated memory structure similar to reading directly 
from a native bitmap file?  The format would be the exact same just in 
memory rather than in a file.  

Visual(?) for clarity:

bitmap.bmp --> datafile.dat  
(byte for byte movement just with a few bytes of header information 
preceding each bitmap)

datafile.dat --> allocate(<sizeofbitmap>) 
(original bitmap file is now contained byte-for-byte in memory)

memory bitmap -->  draw_bitmap(Window1, memHandle, 1, 1)
(The intent anyways.)

So is there an easy way to do this without mucking around in the 
win32lib internals?  Shouldn't it be fairly trivial considering the 
bitmap is byte-for-byte an exact copy of the original file format, just 
in memory?  Sorry, still a bit of a newb but I would like to use my 
datafile format in a win32 prog and can't seem to figure out how to go 
about it using win32lib.  Any helpful pointers would be awesome.

Thanks for your time!

Steve A.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu