Large Amount of Memory Used Drawing Photos

BlitzMax Forums/BlitzMax Programming/Large Amount of Memory Used Drawing Photos

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It doesn't matter what file format the images are, as they will all get uncompressed when loaded into memory, which is why your 150KB file turns into about 4MB, as Gfk has pointed out.

If you want to limit the amount of memory that is being used, then you will need to load them off disk when needed and then purged from memory when no longer needed. Basically, only keep 2 images in memory at once - the current one (for display and use within your fade), and the next one. Once the next one is fully visible, null the last one (so it's freed from memory), and load the next one in ready for the transition. I would also use a GCCollect() call after freeing up the first picture to free the memory straight away.