SPACE.LA
◀ music select
personal / tool / archived

App Resource Generator

PHP + ImageMagick script that generates every iOS and Android icon and splash screen size from a single large PNG or SVG, aimed at PhoneGap projects.

BPM
130
GRADE
B
LEVEL
4
RELEASES
0
YEARS
2013–2013

Every Icon Size Ever

Shipping a PhoneGap app in 2013 meant making a ton of images: every iOS icon size, every Android density, every splash screen in both orientations. Doing that by hand in Photoshop every time the logo changed got old fast.

So the day after I wrote the HipChat batcher, I wrote app-resgen: a PHP script driving ImageMagick that takes one source image and spits out every size the platforms want. I built it for PhoneGap but it works for any project. It supports SVG, but I learned that ImageMagick does better if you just give it a really big PNG.

Crunchbutton had two Cordova apps at that point, one for customers and one for drivers, and both needed the full icon set. It took an afternoon to write.