PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Bitmap & surface size

I have been thinking of putting all tiles for my game into a single huge bitmap.

The bitmap may be around 256x1024. Without regard to memory/storage size, are there issues with Windows CE or GapiDraw that would create problems with this?

It would make distribution easier instead of distributing hundreds of smaller images.

Thanks!
Hi,

The only issue may be some memory requirements when loading the bitmap. If you use PNG, GIF or JPG the following memory allocations will happen:

(1) Surface is created (256x1024x16)
(2) A separate HBITMAP is created (256x1024x24)
(3) A DC is created from the surface (256x1024x16)
(4) The HBITMAP is copied to the DC.
(5) The HBITMAP & DC is freed

As you can see, the temporary memory overhead is quite substantial. If GapiDraw was to use libpng like on the stationary computer version instead the memory overhead could basically be reduced to zero (by reading individual column strips). But then the size of GapiDraw itself would increase by 2x.

Otherwise the new and improved BMP reader with 1.03 is the most memory efficient version with zero overhead. The new version supports 1, 4, 8, 24-bit uncompressed, and 4, and 8-bit compressed BMP (it actually reads several BMP images not even the latest ACDSee will accept). :)

/Johan
Thanks, I'll use smaller bitmaps than those I mentionned.

Device Context and stuff like that is another reason why I hate GDI so much, and why I love GapiDraw.

Eric