for software rendering without run-length encoding it will be: width x height x bytes per pixel plus some small overhead. I never found a way to ask SDL/pygame what the size is, so In my games I keep a total of that calculation above in the image manager stuff.
The size on disk can vary greatly depending on compression settings (for lossy like jpg in particular) and the nature of the image (for lossless like .png in particular) so I wouldn't try to use disk size at all for estimating run-time mem usage. On 10/14/06, Farai Aschwanden <[EMAIL PROTECTED]> wrote:
Hello all I wonder how the memory consumation on graphics can be calculated. Im using a lot of images in my project and would like to know how much memory it is using. Unfortunately I only see the initial memory that my Mac is spending to my game and after loading a certain amount of additional images the OS extends the swap memory space by a default size. A friend of mine told me once that an expanded image in the memory can be x time bigger than the physical size on the harddisc. Im using PNG and JPG. Is there a default factor for all image types you can multiply with the physical image size on the harddisc? Greetings Farai
