I want to automate the branding of a white-label Android app. One thing that requires manual work is taking a 512x512 px PNG image and creating the launcher icons:
├── ic_launcher-playstore.png
└── icons
├── mipmap-hdpi
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
├── mipmap-mdpi
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
├── mipmap-xhdpi
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
├── mipmap-xxhdpi
│ ├── ic_launcher_foreground.png
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
└── mipmap-xxxhdpi
├── ic_launcher_foreground.png
├── ic_launcher.png
└── ic_launcher_round.png
I currently do that via Image Asset Studio, but it's monotonic work that seems easy to automate.
Is there a way to generate those images automatically?
What I thought about
- Using
convert
(imagemagick): I'm uncertain how to apply the rounding though. - A Python package: I haven't found anything on pypi
- Running Image Asset Studio via command line: seems not to be possible