Reduce my Pixmaps

BlitzMax Forums/MaxGUI Module/Reduce my Pixmaps

KillerHunter(Posted 2007) [#1]
Ok, I'd like to have some advices to reduce my pixmaps' size stored into the memory. I've never paid attention how the images were stored into the memory until now. Well, if I'm correct, a pixmap have a similar algorithm to a BMP file. My problem is: I use pretty complexes sprit sheets (the walking animation has 32 frames for example (one of the longest animation)) and it is not long that it rapes the memory.

For now I think I'll:
-Reduce the game resolution to 640x480 instead of 800x600 (with all the sprit sheets of course).
-I'll use a mask instead of an extra byte for the alpha.

So my pixmaps should be about 45% smaller.

Is there anything else I should do to reduce more my pixmaps’ size?

Also, is it faster for Blitz to load an image into a pixmap is the target is Bitmap instead of a compressed picture such a PNG format?


Dreamora(Posted 2007) [#2]
no they won't, the pixmaps are always 32bit, no mather if you have or don't have alpha.

There is no way to reduce pixmap size unless you rewrite the module itself to compress the pixmap (and uncompress it for upload to graphic card to create a texture).


KillerHunter(Posted 2007) [#3]
Really?

I thought you had the format choice while creating a pixmap.

(Took from the help)
Format Description
PF_A8 8 bit alpha
PF_I8 8 bit intensity
PF_RGB888 24 bit big endian RGB
PF_BGR888 24 bit little endian RGB
PF_RGBA8888 32 bit big endian RGB with alpha
PF_BGRA8888 32 bit little endian RGB with alpha


Grisu(Posted 2007) [#4]
^ Maybe the pixmaps are always decompressed internally. So the format doesn't help here?


Dreamora(Posted 2007) [#5]
Yes, if you specify the format, otherwise, they do not exist and if you use load image they will have to meet the image restrictions, which is why you can't specify the format. It will most likely always end 32bit