3 MB game's images use 22 MB in viewer

HunnenkoenigHunnenkoenig Member Posts: 1,173
edited November -1 in Tech Support
Please let me know, how it is possible?

My images are 1,7 MB on the hard drive. If I start my game and not even all images are shown, they become 22 MB in the viewer.

With the engine together I have 64 MB memory usage.

Comments

  • design219design219 Member Posts: 2,273
    I noticed my latest, which is image heavy, bloated more than it seemed possible. But nothing like you are seeing. Are you letting GS convert to png, or are you starting with png?
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    I use png24 images

    Oh, I think, I know why.

    Because my images are not sized like 32x32 and such and they will blown up to the next highest size (something like that is in the FAQ)

    The problem is, in my case it has no sense to size the images this way....

    hm...

    I will see, what I can do.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I'm pretty sure that the file size of the images is UNRELATED to the amount of RAM it takes to display them.

    Regardless of how well you compress your images, the display still has to draw every pixel.

    I'm not exactly sure how the iPhone calculates it, as it uses openGL and other technologies, but for a computer screen, it is calculated like this:

    Image Width * Image Height * Bit-Depth(in bytes)

    So let's say you have an image that is 480x320, at 24-bit (the iPhone displays everything at 24-bit, which is 3 bytes per pixel), that would require about 450Kb of RAM to display it:

    480x320 = 153,600 pixels times 3 bytes for each pixel equals 460,800 bytes

    Now, if you have several images stacked on top of each other, I'm not sure how it gets calculated, but perhaps it tallies them all up separately?

    Of course I could be totally wrong!
Sign In or Register to comment.