If you are programming for Android then you know how hard is to create and manage all that icons for different screen sizes and resolutions. I am using GIMP for creating all my icons and was trying to find script for creating all that icons at once.
The closest one I found is script for creating many PNG files with different sizes at once. That script helped me a lot in creating a this one.
How to install script for creating android icons
This script require GIMP 2.6 or higher.
Download script: GIMP script for creating android icons
Unpack the file and copy script-fu-save-android-icon.scm file to GIMP scripts folder. Its location depends where is GIMP installed and what version of GIMP you have. On my system this folder is: C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts
How to use script
After you install script, you need to restart GIMP or select Filters->Script-Fu-Refresh Scripts.
Now you can run script using new menu item: Script-Fu -> Android -> Save Android Icons ...
You will get following dialog:
Under Android icons type you can select what type of android icons you want to generate:
Action Bar Icons
Status Bar Icons
List View Icons
Resolution of saved icons will depend of what icon type you select.
If you select Custom Icon then you must enter desired resolution for your mdpi icon as baseline icon dimension. Other icon will be scaled according to icon design guidelines:
- ldpi icon will be 0.75 x width and height of mdpi icon
- hdpi will be 1.5 x width and height of mdpi icon
- xhdpi icon will be 2.0 x width and height of mdpi icon
With Save mode options you can select whether you want to save icons under same name but in different folders with standard android folder names (drawable-ldpi,drawable-mdpi, drawable-hdpi, drawable-xhdpi) or you want to save all icons in same folder but with added resolution to the end of the file name.
If you check Use android naming conventions then all icon names will be prefixed with common icon prefix for selected icon type.
Here you can find more about designing icons for Android: Android Icon Design Guidelines
Rest of the options are standard for saving PNG files and I think you will not have problem with them.
I hope you will find this script useful and feel free to leave comments and requests for improvement.
Updated 04.03.2015 (by Leonid S. Usov )
- support for automatic creation of drawable subdirectories
Updated 13.12.2013 (by Dieter Adriaenssens)
- added support for XXHDPI and XXXHDPI screens
Added support for
- action bar icons
- icons with custom size
- xhdpi screen icon
or on GitHub: ruleant/script-fu-save-android-icons