[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Memory consumation on graphics



Farai, the word you mean to use is 'consumption' not 'consumation.'
Consummation means something quite different than consumption :)
Hope that helps,
-Luke

On 10/14/06, Farai Aschwanden <fash@xxxxxxxxxx> wrote:
Tnx for the info. I thought it has to be calculated for every
colordepth layer but your calculation sounds more sympathic. ;)


Am 14.10.2006 um 19:53 schrieb Brian Fisher:

> 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 <fash@xxxxxxxxxx> 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
>>
>>