Hi,
does it matter if using 24 bit or 16 bit graphic files for sprite design re the performance of the graphic engine of PPL (e.g. colission, animation, moving sprites, etc.)?
Thanks,
DirectDance
That is a very good question. It certainly won't affect collision check performance but might have an impact on sprite rendering speed but I am not a gfx expert. You should ask in the PocketHAL/PocketFrog forums here, it's the best place to get good answers about gfx performance on PocketPC's.
Using PF Surfaces for the image data, the 24-bits are converted to 16-bits as they're loaded in, so there's no impact, except in filesize. In The Sudoku Collection, I converted all of my .PNGs from 24-bit to 16-bit, and saved about half a meg in the .cab size. As for blitting the images, it copies the memory directly, unless you're using pixel shaders or alpha blending, so once again it won't matter if the original is 24- or 16-bit. Now, if PPL keeps the images as HBITMAPs (which I don't think it does), then it'll behave differently, and could use up to 4 bytes per pixel, but I thought it was using PF for the image stuff.
-John
PPL uses standard PocketHAL / PocketFrog and doesn't convert to HBITMAP's to clarify!
If I were you I would do like Presto said, convert them to 16 bits. Who will see the difference between 24 bits and 16 bits anyway!
Thanks Presto for the useful information.
No problem. I didn't mean that PPL converted images to HBITMAPs. It's actually the other way around. When PF reads in the original file, it's stored in a HBITMAP structure, which PF then converts into a Surface object with its CreateSurface function. Like if you use the SHLoadImageFile function, it reads the data into a HBITMAP. This doesn't apply to Surfaces created from streams though. Anyway, I just wasn't 100% sure if PPL was using PF Surfaces for handling images. Glad to hear that it is.
-John