Remember that 40 MB of image files on disk is much larger if you put them in memory. They are compressed on the disk, but as soon as you load it into memory, you use as much memory as an uncompressed image. If I remember correctly (width x height x (bits per pixel / 8)) = memory usage, so for a full-screen image (1024x768x (16/8)) = 1,572,864, so there’s about 1.5 MB of RAM, and on disk it could be only a couple of hundred KB.
source
share