I need to post-release support different display densities on Android
During development drawable-hdpi has grown to 160 png (like 20 of them 9 patch) assets
I now need to convert all those bitmaps to mdpi, ldpi (layouts and drawables XML are already fine, to avoid raising OOM on LayoutInflater
Is there any tool suitable to convert all those bitmaps in batch ?
Here is a simple script to create lower-resolution Android drawables from higher-resolution ones.
For example, given a batch of -xhdpi images, it can generate -hdpi and -mdpi images.
With this script, it’s possible to export only highest-resolution artwork from authoring tools and then create the lower-resolution versions with a few batch commands.
Script usage:
This will take every png file from xhdpi and place lower-resolution versions into mdpi and hdpi folders.
http://kmansoft.com/2012/05/23/scale-android-drawables-with-a-script/
original script, https://gist.github.com/2771791
Script itself, to avoid dependency on github gist/original blogpost.
name drawable_convert.py