I’m loading a 489KB bitmap using the BitmapFactory.decodeFile.
and I check how much memory my program takes after loading it and I see it adds ~5000KB
why is that, and what should I do to avoid it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your bitmap is file is most likely compressed (PNG/JPG).
You can’t expect that loaded bitmap will be still compressed in memory.
Each decompressed pixel in memory takes usually 4 bytes.