In my app, I put PNG images into drawable directory and use them as activity backgrounds. Since the background image usually cover the whole screen, they are big and use a lot of memory. My background images are total opaque. Is there any way that I can optimize those background images, so they can take less memory? I heard that we can reduce the color-depth of the images so they take less memory when loaded, but I don't know how to reduce the color-depth? What tool can I use?
Thanks.
You can try converting your drawable to a bitmap
and then using BitmapFactory.Options
to reduce the sample size, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With