Advertisement

loading bitmap question?

Started by January 27, 2003 07:53 AM
1 comment, last by tgramsus 21 years, 9 months ago
i know you can load a bitmap with LoadImage(), but one can also open the bitmap file, read in the data and store in a buffer. but where do you blit this buffer to in order to make a DDsurface? [edited by - tgramsus on January 27, 2003 8:54:33 AM]
TG Ramsus
If you read the bitmap data into an array of bytes (or words, dwords, whatever) you can then copy the data from the array to a direct draw surface by locking the surface and using memcpy(). Reading data from bitmaps isn''t that fun though - bitmaps have a lot of quirks. They are usually stored upside-down, and each row is buffered so that the number of bytes in a row is a multiple of 4. Also I think bitmaps may be stored in BGR format (although I can''t remember at this moment).
-YoshiXGXCX ''99
Advertisement
thanks man
TG Ramsus

This topic is closed to new replies.

Advertisement