# Why do my images take 200 MB of RAM when they are ~20KB on disk?

I am creating an Android game using libGDX. When I load my nine images it takes 200 MB of RAM. But the images are 10 to 17 KB each. Why the discrepancy? Here is where I create textures from those images:

public static HashMap<String, Texture> ground = new HashMap<String, Texture>();
for (int i = 1; i < 10; i++) {
ground.put(
"ground" + i,
new Texture(Gdx.files.internal("groundImages/ground" + i + ".png"))
);
}

• How compressed are your PNG files? I might be wrong but I was under the impression that loaded textures would be uncompressed. – Kurley Nov 6 '14 at 14:23
• png8 , when I dispose textures everything is good with ram but the sprites from that textures shows black squares . – Vahe Muradyan Nov 6 '14 at 14:39
• If you dispose of your textures it's probably not unexpected that you can't use them anymore. Do you know what the uncompressed size of your images are? They may be small files when compressed as PNG, but when uncompressed in memory they probably take up more space. – Kurley Nov 6 '14 at 15:34
• If your images are RGBA8888 then the uncompressed size is usually width x height x 4 = size in bytes. – Kurley Nov 6 '14 at 15:41
• Are you generating mipmaps ? If so be sure to consider the memory taken by the complete mipmap chains for 2500x1500 textures. – LJᛃ Nov 6 '14 at 22:56